OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
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.waitUntilDone(); | |
28 testRunner.dumpAsText(); | |
29 } | |
30 | |
31 function animationStarted() | |
32 { | |
33 if (window.testRunner) { | |
34 var target = document.getElementById('target'); | |
35 var paused = internals.pauseAnimationAtTimeOnElement("anim", 1, target); | |
36 var result; | |
37 if (paused) | |
38 result = "PASS: correctly paused animation"; | |
39 else | |
40 result = "FAIL: failed to pause animation"; | |
41 | |
42 document.getElementById('results').innerText = result; | |
43 testRunner.notifyDone(); | |
44 } else | |
45 document.getElementById('results').innerText = "This test requires WebCo
re Internals"; | |
46 } | |
47 | |
48 function startTest() | |
49 { | |
50 var target = document.getElementById('target'); | |
51 target.style.webkitAnimationName = "anim"; | |
52 waitForAnimationToStart(target, animationStarted); | |
53 } | |
54 </script> | |
55 </head> | |
56 <body onload="startTest()"> | |
57 <!-- Test for Internals' pauseAnimationAtTimeOnElement() API on animations wit
h multiple keyframes --> | |
58 <div id="target"></div> | |
59 <div id="results"></div> | |
60 | |
61 </body> | |
62 </html> | |
OLD | NEW |