blob: a59ce6e2d54c584d27802caf06acf0af59c5af9e [file] [log] [blame]
timothy_horton@apple.com85558652012-09-04 18:31:31 +00001<html>
mark.lam@apple.com1ca737d2013-09-08 05:29:22 +00002<script src="../../resources/js-test-pre.js"></script>
timothy_horton@apple.com85558652012-09-04 18:31:31 +00003<script src="resources/SVGAnimationTestCase.js"></script>
4<script>
5function load() {
6 if (window.testRunner) {
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
9 }
10
11 svg = document.getElementById("svg");
12 rect = document.getElementById("rect");
13
14 setTimeout(function () {
15 svg.setCurrentTime(1);
16
17 document.body.removeChild(svg);
18 document.body.appendChild(svg);
19
20 setTimeout(function () {
21 shouldBeCloseEnough("rect.x.animVal.value", "30", 1);
22
23 svg.setCurrentTime(2);
24
25 shouldBeCloseEnough("rect.x.animVal.value", "60", 1);
26
27 if (window.testRunner)
28 testRunner.notifyDone();
29 }, 0);
30 }, 0);
31};
32</script>
33<body onload="load()">
34 <h1>Reinserting SVG animation into document should continue the animation</h1>
35 <p id="description"></p>
36 <div id="console"></div>
37 <svg id="svg" xmlns="http://www.w3.org/2000/svg">
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" />
40 </rect>
41 </svg>
42</body>
43</html>