| 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 // FIXME: we need a better way of waiting for chromium events to happen |
| 14 setTimeout(function () { | 15 setTimeout(function () { |
| 15 svg.setCurrentTime(1); | 16 svg.setCurrentTime(1); |
| 16 | 17 |
| 17 document.body.removeChild(svg); | 18 document.body.removeChild(svg); |
| 18 document.body.appendChild(svg); | 19 document.body.appendChild(svg); |
| 19 | 20 |
| 21 // FIXME: we need a better way of waiting for chromium events to happen |
| 20 setTimeout(function () { | 22 setTimeout(function () { |
| 21 shouldBeCloseEnough("rect.x.animVal.value", "30", 1); | 23 shouldBeCloseEnough("rect.x.animVal.value", "30", 1); |
| 22 | 24 |
| 23 svg.setCurrentTime(2); | 25 svg.setCurrentTime(2); |
| 24 | 26 |
| 25 shouldBeCloseEnough("rect.x.animVal.value", "60", 1); | 27 shouldBeCloseEnough("rect.x.animVal.value", "60", 1); |
| 26 | 28 |
| 27 if (window.testRunner) | 29 if (window.testRunner) |
| 28 testRunner.notifyDone(); | 30 testRunner.notifyDone(); |
| 29 }, 0); | 31 }, 1); |
| 30 }, 0); | 32 }, 1); |
| 31 }; | 33 }; |
| 32 </script> | 34 </script> |
| 33 <body onload="load()"> | 35 <body onload="load()"> |
| 34 <h1>Reinserting SVG animation into document should continue the animation</h
1> | 36 <h1>Reinserting SVG animation into document should continue the animation</h
1> |
| 35 <p id="description"></p> | 37 <p id="description"></p> |
| 36 <div id="console"></div> | 38 <div id="console"></div> |
| 37 <svg id="svg" xmlns="http://www.w3.org/2000/svg"> | 39 <svg id="svg" xmlns="http://www.w3.org/2000/svg"> |
| 38 <rect id="rect" x="0" y="0" width="20" height="20"> | 40 <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" /> | 41 <animate attributeName="x" begin="0" from="0" to="90" dur="3s" fill=
"freeze" /> |
| 40 </rect> | 42 </rect> |
| 41 </svg> | 43 </svg> |
| 42 </body> | 44 </body> |
| 43 </html> | 45 </html> |
| OLD | NEW |