wpt / svg / animations / animate-currentcolor-in-visited-link.html

Status: TIMEOUT | Duration: 46ms | Subtests: 0/1 | Open test on wpt.live | wpt.fyi

/svg/animations/animate-currentcolor-in-visited-link.html

<!DOCTYPE html>
<title>SMIL animating 'currentcolor' on target within visited link</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/selectors/#visited-privacy">
<style>
  a:link    { color: blue; }
  a:visited { color: lightblue; }
</style>
<a href="">
  <svg>
    <rect id="r" width="100" height="100">
      <set attributeName="fill" to="currentcolor"/>
    </rect>
  </svg>
</a>
<script>
  async_test(t => {
    const rect = document.getElementById('r');
    const set = rect.firstElementChild;
    set.onbegin = t.step_func_done(() => {
      const style = getComputedStyle(rect);
      assert_equals(style.fill, style.color, `currentcolor animation does not leak :visited`);
    });
  });
</script>