Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-cancel.html

Issue 1433623002: Devtools Animations: Don't wait for empty transitions to start (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-cancel-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script> 4 <script>
5 5
6 var player; 6 var player;
7 7
8 function startAnimation() 8 function startAnimation()
9 { 9 {
10 player = node.animate([{ width: "100px" }, { width: "200px" }], 2000); 10 player = node.animate([{ width: "100px" }, { width: "200px" }], 2000);
11 } 11 }
12 12
13 function cancelAnimation() 13 function cancelAnimation()
14 { 14 {
15 player.cancel(); 15 player.cancel();
16 } 16 }
17 17
18
19 function test() 18 function test()
20 { 19 {
21 InspectorTest.eventHandler["Animation.animationCreated"] = onCreated; 20 InspectorTest.eventHandler["Animation.animationCreated"] = onCreated;
21 InspectorTest.eventHandler["Animation.animationCanceled"] = onCanceled;
22 InspectorTest.eventHandler["Animation.animationStarted"] = onStarted; 22 InspectorTest.eventHandler["Animation.animationStarted"] = onStarted;
23 InspectorTest.sendCommand("Animation.enable", {}); 23 InspectorTest.sendCommand("Animation.enable", {});
24 InspectorTest.evaluateInPage("startAnimation()", function() {}); 24 InspectorTest.evaluateInPage("startAnimation()", function() {});
25 25
26 function onCreated() 26 function onCreated()
27 { 27 {
28 InspectorTest.log("Animation created"); 28 InspectorTest.log("Animation created");
29 } 29 }
30 30
31 function onStarted() 31 function onStarted()
32 { 32 {
33 InspectorTest.log("Animation started"); 33 InspectorTest.log("Animation started");
34 InspectorTest.evaluateInPage("cancelAnimation()", function() {});
35 }
36
37 function onCanceled()
38 {
39 InspectorTest.log("Animation canceled");
34 InspectorTest.completeTest(); 40 InspectorTest.completeTest();
35 } 41 }
36 } 42 }
37 43
38 </script> 44 </script>
39 </head> 45 </head>
40 <body onload="runTest()"> 46 <body onload="runTest()">
41 <div id="node" style="background-color: red; height: 100px"></div> 47 <div id="node" style="background-color: red; height: 100px"></div>
42 </body> 48 </body>
43 </html> 49 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-cancel-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698