OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | |
4 <script> | |
5 | |
6 var player; | |
7 | |
8 function startAnimation() | |
9 { | |
10 player = node.animate([{ width: "100px" }, { width: "200px" }], 2000); | |
11 } | |
12 | |
13 function cancelAnimation() | |
14 { | |
15 player.cancel(); | |
16 } | |
17 | |
18 function test() | |
19 { | |
20 InspectorTest.eventHandler["Animation.animationCreated"] = onCreated; | |
21 InspectorTest.eventHandler["Animation.animationCanceled"] = onCanceled; | |
22 InspectorTest.eventHandler["Animation.animationStarted"] = onStarted; | |
23 InspectorTest.sendCommand("Animation.enable", {}); | |
24 InspectorTest.evaluateInPage("startAnimation()", function() {}); | |
25 | |
26 function onCreated() | |
27 { | |
28 InspectorTest.log("Animation created"); | |
29 } | |
30 | |
31 function onStarted() | |
32 { | |
33 InspectorTest.log("Animation started"); | |
34 InspectorTest.evaluateInPage("cancelAnimation()", function() {}); | |
35 } | |
36 | |
37 function onCanceled() | |
38 { | |
39 InspectorTest.log("Animation canceled"); | |
40 InspectorTest.completeTest(); | |
41 } | |
42 } | |
43 | |
44 </script> | |
45 </head> | |
46 <body onload="runTest()"> | |
47 <div id="node" style="background-color: red; height: 100px"></div> | |
48 </body> | |
49 </html> | |
OLD | NEW |