OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource
s/inspector-protocol-test.js"></script> | |
4 <script> | |
5 | |
6 var player; | |
7 | |
8 function startAnimation() | |
9 { | |
10 node.style.width = "200px"; | |
11 } | |
12 | |
13 function test() | |
14 { | |
15 InspectorTest.eventHandler["Animation.animationStarted"] = onStarted; | |
16 InspectorTest.sendCommand("Animation.enable", {}); | |
17 InspectorTest.evaluateInPage("startAnimation()", function() {}); | |
18 setTimeout(InspectorTest.completeTest.bind(InspectorTest), 2000); | |
19 function onStarted(response) | |
20 { | |
21 InspectorTest.log("Animation started"); | |
22 seekAnimations(response.params.animation.id, 5); | |
23 } | |
24 | |
25 function seekAnimations(id, runs) | |
26 { | |
27 if (runs == 0) | |
28 InspectorTest.completeTest(); | |
29 | |
30 InspectorTest.sendCommand("Animation.seekAnimations", { animations: [ id
], currentTime: 0 }, seekAnimations.bind(null, id, --runs)); | |
31 InspectorTest.log("Animation seeked"); | |
32 } | |
33 } | |
34 | |
35 </script> | |
36 </head> | |
37 <body onload="runTest()"> | |
38 <div id="node" style="background-color: red; height: 100px; transition: widt
h 100ms; width: 100px"></div> | |
39 </body> | |
40 </html> | |
OLD | NEW |