OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <style> | |
5 #target { | |
6 position: relative; | |
7 left: 100px; | |
8 height: 100px; | |
9 width: 100px; | |
10 background-color: blue; | |
11 -webkit-animation-duration: 1s; | |
12 -webkit-animation-timing-function: linear; | |
13 } | |
14 | |
15 @-webkit-keyframes bounce { | |
16 from { | |
17 left: 100px; | |
18 } | |
19 to { | |
20 left: 200px; | |
21 } | |
22 } | |
23 | |
24 </style> | |
25 | |
26 <script src="resources/animation-test-helpers.js"></script> | |
27 <script> | |
28 if (window.testRunner) { | |
29 testRunner.waitUntilDone(); | |
30 testRunner.dumpAsText(); | |
31 } | |
32 | |
33 function animationStarted() | |
34 { | |
35 if (window.testRunner) { | |
36 var target = document.getElementById('target'); | |
37 var paused = internals.pauseAnimationAtTimeOnElement("bounce", 1.0, targ
et); | |
38 var result = ""; | |
39 if (paused) | |
40 result = "PASS: correctly paused animation"; | |
41 else | |
42 result = "FAIL: failed to pause animation"; | |
43 | |
44 document.getElementById('results').innerText = result; | |
45 testRunner.notifyDone(); | |
46 } else | |
47 document.getElementById('results').innerText = "This test requires WebCo
re Internals"; | |
48 } | |
49 | |
50 function startTest() | |
51 { | |
52 var target = document.getElementById('target'); | |
53 target.style.webkitAnimationName = "bounce"; | |
54 waitForAnimationToStart(target, animationStarted); | |
55 } | |
56 </script> | |
57 </head> | |
58 <body onload="startTest()"> | |
59 <!-- Test for Internals pauseAnimationAtTimeOnElement() API --> | |
60 <div id="target"></div> | |
61 <div id="results"></div> | |
62 </body> | |
63 </html> | |
OLD | NEW |