Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / animations / getCurrentTime-pause-unpause.html
blobc16b4e1094fb10dd76b9a092dd0509f4f0c4e6f5
1 <!DOCTYPE html>
2 <!--This tests svg.getCurrentTime() when SVG animation is paused and unpaused.
3 Sequence of steps are,
4 1. Pause the SVG animation at the beginning.
5 2. 10 msec delay
6 3. Test 1, measure the currentTime which should still be 0.
7 4. Unpause the SVG animation
8 5. 50 msec delay
9 6. Test 2, measure the currentTime which should be .05 sec.
10 7. Pause the SVG animation
11 8. 50 msec delay
12 9. Test 3, measure the currentTime which should still be .05 sec.
13 -->
14 <html>
15 <script src="../../resources/js-test.js"></script>
16 <script src="resources/SVGAnimationTestCase.js"></script>
17 <script>
18 function load() {
19 if (window.testRunner) {
20 testRunner.dumpAsText();
21 testRunner.waitUntilDone();
24 svg = document.getElementById("svg");
25 rect = document.getElementById("rect");
27 svg.pauseAnimations();
28 setTimeout(function() {
29 shouldBeCloseEnough("svg.getCurrentTime()", "0", 0.01);
30 svg.unpauseAnimations();
31 setTimeout(function() {
32 shouldBeCloseEnough("svg.getCurrentTime()", "0.05", 0.02);
33 svg.pauseAnimations();
34 setTimeout(function() {
35 shouldBeCloseEnough("svg.getCurrentTime()", "0.05", 0.02);
36 if (window.testRunner)
37 testRunner.notifyDone();
38 }, 50);
39 }, 50);
40 }, 10);
42 </script>
43 <head><title>svg.getCurrentTime() when SVG animation is paused and unpaused</title></head>
44 <body onload="load()">
45 <svg id="svg" xmlns="http://www.w3.org/2000/svg">
46 <rect id="rect" fill="green" width="20" height="20">
47 <animate attributeName="x" from="0" to="200" begin="0s" dur="3s"></animate>
48 </rect>
49 </svg>
50 </body>
51 </html>