Header parsing for experimental and internal debug features
[WebKit-https.git] / LayoutTests / animations / animation-internals-api-multiple-keyframes.html
1 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=false ] -->
2
3 <html>
4 <head>
5   <style>
6     #target {
7       position: relative;
8       left: 100px;
9       height: 100px;
10       width: 100px;
11       background-color: blue;
12       -webkit-animation-duration: 1s;
13       -webkit-animation-timing-function: linear;
14     }
15
16     @-webkit-keyframes anim {
17       from { left: 10px; }
18       40% { left: 30px; }
19       60% { left: 15px; }
20       to { left: 20px; }
21     }
22    </style>
23
24    <script src="resources/animation-test-helpers.js"></script>
25    <script>
26     if (window.testRunner)
27       testRunner.dumpAsText();
28
29     function animationStarted()
30     {
31       if (window.testRunner) {
32         var target = document.getElementById('target');
33         var paused = internals.pauseAnimationAtTimeOnElement("anim", 1, target);
34         var result;
35         if (paused)
36           result = "PASS: correctly paused animation";
37         else
38           result = "FAIL: failed to pause animation";
39
40         document.getElementById('results').innerText = result;
41         testRunner.notifyDone();
42       } else
43         document.getElementById('results').innerText = "This test requires WebCore Internals";
44     }
45
46     function startTest()
47     {
48       var target = document.getElementById('target');
49       target.style.webkitAnimationName = "anim";
50       waitForAnimationToStart(target, animationStarted);
51     }
52    </script>
53 </head>
54 <body onload="startTest()">
55   <!-- Test for Internals' pauseAnimationAtTimeOnElement() API on animations with multiple keyframes -->
56   <div id="target"></div>
57   <div id="results"></div>
58
59 </body>
60 </html>