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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-paused-css-animation.html

Issue 1422713012: Devtools Animations: Listen to all animation play state changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 <style type="text/css">
5 #node.anim {
6 animation: anim 300ms ease-in-out paused;
7 }
8
9 @keyframes anim {
10 from {
11 width: 100px;
12 }
13 to {
14 width: 200px;
15 }
16 }
17 </style>
4 <script> 18 <script>
5 19
6 function triggerEmptyTransition() 20 function startAnimation()
7 { 21 {
8 node.offsetTop; 22 node.classList.add("anim");
9 node.style.transition = "1s";
10 node.offsetTop;
11 node.style.width = "200px";
12 node.offsetTop;
13 node.style.transition = "";
14 node.offsetTop;
15 } 23 }
16 24
17 function test() 25 function test()
18 { 26 {
19 InspectorTest.eventHandler["Animation.animationCreated"] = onCreated; 27 InspectorTest.eventHandler["Animation.animationCreated"] = onCreated;
20 InspectorTest.eventHandler["Animation.animationCanceled"] = onCanceled; 28 InspectorTest.eventHandler["Animation.animationCanceled"] = onCanceled;
21 InspectorTest.sendCommand("Animation.enable", {}); 29 InspectorTest.sendCommand("Animation.enable", {});
22 InspectorTest.evaluateInPage("triggerEmptyTransition()", function() {}); 30 InspectorTest.evaluateInPage("startAnimation()", function() {});
23 31
24 function onCreated() 32 function onCreated()
25 { 33 {
26 InspectorTest.log("Animation created"); 34 InspectorTest.log("Animation created");
27 } 35 }
28 36
29 function onCanceled() 37 function onCanceled()
30 { 38 {
31 InspectorTest.log("Animation canceled"); 39 InspectorTest.log("Animation canceled");
32 InspectorTest.completeTest(); 40 InspectorTest.completeTest();
33 } 41 }
34 } 42 }
35 43
36 </script> 44 </script>
37 </head> 45 </head>
38 <body onload="runTest()"> 46 <body onload="runTest()">
39 <div id="node" style="background-color: red; width: 100px"></div> 47 <div id="node" style="background-color: red; width: 100px"></div>
40 </body> 48 </body>
41 </html> 49 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698