diff options
Diffstat (limited to 'testing/web-platform/tests/svg/animations/pruning-first-interval.html')
-rw-r--r-- | testing/web-platform/tests/svg/animations/pruning-first-interval.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/animations/pruning-first-interval.html b/testing/web-platform/tests/svg/animations/pruning-first-interval.html new file mode 100644 index 0000000000..5a1d1463be --- /dev/null +++ b/testing/web-platform/tests/svg/animations/pruning-first-interval.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<title>Timed element not active after first interval active duration changes to unresolved</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<svg> + <rect width="100" height="100" fill="green"> + <set attributeName="fill" to="red" fill="freeze" + begin="click" end="click" dur="100ms" repeatCount="indefinite"/> + </rect> +</svg> +<script> + async_test(function(t) { + let set = document.querySelector('set'); + window.onload = t.step_func(function() { + t.step_timeout(function() { + set.setAttribute('begin', '-100ms'); + set.setAttribute('begin', 'click'); + set.parentNode.appendChild(set); + set.setAttribute('end', '-100ms'); + set.setAttribute('end', 'click'); + window.requestAnimationFrame(t.step_func_done(function() { + let target = set.targetElement; + assert_equals(getComputedStyle(target).fill, 'rgb(0, 128, 0)'); + })); + }, 0); + }); + }); +</script> |