OLD | NEW |
1 <html> | 1 <html> |
2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <script src="resources/SVGAnimationTestCase.js"></script> | 3 <script src="resources/SVGAnimationTestCase.js"></script> |
4 <script> | 4 <script> |
5 function load() { | 5 function load() { |
6 if (window.testRunner) { | 6 if (window.testRunner) { |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
8 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
9 } | 9 } |
10 | 10 |
11 svg = document.getElementById("svg"); | 11 svg = document.getElementById("svg"); |
12 rect = document.getElementById("rect"); | 12 rect = document.getElementById("rect"); |
13 | 13 |
14 setTimeout(function () { | 14 requestAnimationFrame(function () { |
15 svg.setCurrentTime(1); | 15 svg.setCurrentTime(1); |
16 | 16 |
17 document.body.removeChild(svg); | 17 document.body.removeChild(svg); |
18 document.body.appendChild(svg); | 18 document.body.appendChild(svg); |
19 | 19 |
20 setTimeout(function () { | 20 requestAnimationFrame(function () { |
21 shouldBeCloseEnough("rect.x.animVal.value", "30", 1); | 21 shouldBeCloseEnough("rect.x.animVal.value", "30", 1); |
22 | 22 |
23 svg.setCurrentTime(2); | 23 svg.setCurrentTime(2); |
24 | 24 |
25 shouldBeCloseEnough("rect.x.animVal.value", "60", 1); | 25 shouldBeCloseEnough("rect.x.animVal.value", "60", 1); |
26 | 26 |
27 if (window.testRunner) | 27 if (window.testRunner) |
28 testRunner.notifyDone(); | 28 testRunner.notifyDone(); |
29 }, 0); | 29 }); |
30 }, 0); | 30 }); |
31 }; | 31 }; |
32 </script> | 32 </script> |
33 <body onload="load()"> | 33 <body onload="load()"> |
34 <h1>Reinserting SVG animation into document should continue the animation</h
1> | 34 <h1>Reinserting SVG animation into document should continue the animation</h
1> |
35 <p id="description"></p> | 35 <p id="description"></p> |
36 <div id="console"></div> | 36 <div id="console"></div> |
37 <svg id="svg" xmlns="http://www.w3.org/2000/svg"> | 37 <svg id="svg" xmlns="http://www.w3.org/2000/svg"> |
38 <rect id="rect" x="0" y="0" width="20" height="20"> | 38 <rect id="rect" x="0" y="0" width="20" height="20"> |
39 <animate attributeName="x" begin="0" from="0" to="90" dur="3s" fill=
"freeze" /> | 39 <animate attributeName="x" begin="0" from="0" to="90" dur="3s" fill=
"freeze" /> |
40 </rect> | 40 </rect> |
41 </svg> | 41 </svg> |
42 </body> | 42 </body> |
43 </html> | 43 </html> |
OLD | NEW |