2 <script src=
"../../resources/js-test.js"></script>
3 <script src=
"resources/SVGAnimationTestCase.js"></script>
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.waitUntilDone();
11 svg
= document
.getElementById("svg");
12 rect
= document
.getElementById("rect");
14 // FIXME: we need a better way of waiting for chromium events to happen
15 setTimeout(function () {
16 svg
.setCurrentTime(1);
18 document
.body
.removeChild(svg
);
19 document
.body
.appendChild(svg
);
21 // FIXME: we need a better way of waiting for chromium events to happen
22 setTimeout(function () {
23 shouldBeCloseEnough("rect.x.animVal.value", "30", 1);
25 svg
.setCurrentTime(2);
27 shouldBeCloseEnough("rect.x.animVal.value", "60", 1);
29 if (window
.testRunner
)
30 testRunner
.notifyDone();
35 <body onload=
"load()">
36 <h1>Reinserting SVG animation into document should continue the animation
</h1>
37 <p id=
"description"></p>
38 <div id=
"console"></div>
39 <svg id=
"svg" xmlns=
"http://www.w3.org/2000/svg">
40 <rect id=
"rect" x=
"0" y=
"0" width=
"20" height=
"20">
41 <animate attributeName=
"x" begin=
"0" from=
"0" to=
"90" dur=
"3s" fill=
"freeze" />