Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / animate-pause-resume.html
blob097c6649fa7ea2a92cd3ab7e8432d4fd641e4b47
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 Test for WK81350: setCurrentTime() should work when animation is paused.
5 -->
6 <body>
7 <svg id="svg" width="400" height="400">
8 <rect id="rect" x="0" y="0" width="100" height="100" fill="green">
9 <animate attributeName="x" from="200" to="400" begin="0s" dur="4s" />
10 </rect>
11 </svg>
12 <script>
13 if (window.testRunner) {
14 testRunner.waitUntilDone();
15 testRunner.dumpAsText();
18 var svg = document.getElementById("svg");
19 var rect = document.getElementById("rect");
21 svg.pauseAnimations();
22 setTimeout(function() {
23 svg.setCurrentTime(4);
24 svg.unpauseAnimations();
25 setTimeout(function() {
26 if (rect.x.animVal.value == 0)
27 document.body.innerHTML = "PASS";
28 else
29 document.body.innerHTML = "FAIL : rect.x.animVal.value was " + rect.x.animVal.value + " but we expected 0.";
31 if (window.testRunner)
32 testRunner.notifyDone();
33 }, 1);
34 }, 50);
35 </script>
36 </body>
37 </html>