OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
3 <!-- | 4 <!-- |
4 Test for WK89943: pausing and unpausing an animation before it starts should
have no effect. | 5 Test for WK89943: pausing and unpausing an animation before it starts should
have no effect. |
5 --> | 6 --> |
6 <body> | 7 <svg id="svg" width="400" height="400"> |
7 <svg id="svg" width="400" height="400"> | 8 <rect x="0" y="0" width="100" height="100" fill="red"/> |
8 <rect x="0" y="0" width="100" height="100" fill="red"/> | 9 <rect id="rect" x="100" y="0" width="100" height="100" fill="green"> |
9 <rect id="rect" x="100" y="0" width="100" height="100" fill="green"> | 10 <set attributeName="x" to="0" begin="0.01s" fill="freeze"/> |
10 <set attributeName="x" to="0" begin="0.01s" fill="freeze"/> | 11 </rect> |
11 </rect> | 12 </svg> |
12 </svg> | 13 <script> |
13 <script> | 14 async_test(function(t) { |
14 if (window.testRunner) { | 15 var svg = document.getElementById("svg"); |
15 testRunner.waitUntilDone(); | |
16 testRunner.dumpAsText(); | |
17 } | |
18 | 16 |
19 var svg = document.getElementById("svg"); | 17 svg.pauseAnimations(); |
20 var rect = document.getElementById("rect"); | 18 svg.unpauseAnimations(); |
21 | 19 |
22 svg.pauseAnimations(); | 20 var endStep = t.step_func_done(function() { |
23 svg.unpauseAnimations(); | 21 var rect = document.getElementById("rect"); |
| 22 assert_equals(rect.x.animVal.value, 0, "<set> is applied"); |
| 23 }); |
24 | 24 |
25 setTimeout(function() { | 25 window.onload = function() { |
26 if (rect.x.animVal.value == 0) | 26 requestAnimationFrame(function() { |
27 document.body.innerHTML = "PASS"; | 27 setTimeout(endStep, 50); |
28 else | 28 }); |
29 document.body.innerHTML = "FAIL : rect.x.animVal.value was " + r
ect.x.animVal.value + " but we expected 0."; | 29 }; |
30 | 30 }, "Pausing and unpausing an animation before it starts should have no effect"); |
31 if (window.testRunner) | 31 </script> |
32 testRunner.notifyDone(); | |
33 }, 50); | |
34 </script> | |
35 </body> | |
36 </html> | |
OLD | NEW |