Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / animation / animation-create-cancel.html
blobf09c2b8729c0e56995cf362f447d07eff2ac1aa4
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script>
6 var player;
8 function startAnimation()
10 player = node.animate([{ width: "100px" }, { width: "200px" }], 2000);
13 function cancelAnimation()
15 player.cancel();
19 function test()
21 InspectorTest.eventHandler["Animation.animationCreated"] = onCreated;
22 InspectorTest.eventHandler["Animation.animationCanceled"] = onCanceled;
23 InspectorTest.sendCommand("Animation.enable", {});
24 InspectorTest.evaluateInPage("startAnimation()", function() {});
26 function onCreated()
28 InspectorTest.log("Animation created");
29 InspectorTest.evaluateInPage("cancelAnimation()", function() {});
32 function onCanceled()
34 InspectorTest.log("Animation canceled");
35 InspectorTest.completeTest();
39 </script>
40 </head>
41 <body onload="runTest()">
42 <div id="node" style="background-color: red; height: 100px"></div>
43 </body>
44 </html>