| <!DOCTYPE HTML> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <!-- |
| Test for WK89943: pausing and unpausing an animation before it starts should have no effect. |
| --> |
| <svg id="svg" width="400" height="400"> |
| <rect x="0" y="0" width="100" height="100" fill="red"/> |
| <rect id="rect" x="100" y="0" width="100" height="100" fill="green"> |
| <set attributeName="x" to="0" begin="0.01s" fill="freeze"/> |
| </rect> |
| </svg> |
| <script> |
| async_test(function(t) { |
| var svg = document.getElementById("svg"); |
| |
| svg.pauseAnimations(); |
| svg.unpauseAnimations(); |
| |
| var endStep = t.step_func_done(function() { |
| var rect = document.getElementById("rect"); |
| assert_equals(rect.x.animVal.value, 0, "<set> is applied"); |
| }); |
| |
| window.onload = function() { |
| requestAnimationFrame(function() { |
| setTimeout(endStep, 50); |
| }); |
| }; |
| }, "Pausing and unpausing an animation before it starts should have no effect"); |
| </script> |