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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/animation/animation-web-anim-negative-start-time.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 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 src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 function startAnimation() 6 function startAnimation()
7 { 7 {
8 node.animate([{ width: "100px" }, { width: "200px" }], { duration: 200, dela y: 100 }); 8 node.animate([{ width: "100px" }, { width: "200px" }], { duration: 200, dela y: 100 });
9 } 9 }
10 10
11 function startAnimationWithNegativeStartTime() 11 function startAnimationWithNegativeStartTime()
12 { 12 {
13 animation = node.animate([{ width: "100px" }, { width: "200px" }], { duratio n: 20000, delay: 100, endDelay: 200 }); 13 animation = node.animate([{ width: "100px" }, { width: "200px" }], { duratio n: 20000, delay: 100, endDelay: 200 });
14 animation.startTime = -10000; 14 animation.startTime = -10000;
15 } 15 }
16 16
17 var initialize_Animations = function() { 17 var initialize_Animations = function() {
18 18
19 InspectorTest.preloadModule("animation"); 19 InspectorTest.preloadModule("animation");
20 } 20 }
21 21
22 function test() 22 function test()
23 { 23 {
24 // Override timeline width for testing 24 // Override timeline width for testing
25 WebInspector.AnimationTimeline.prototype.width = function() { return 50; } 25 Animation.AnimationTimeline.prototype.width = function() { return 50; }
26 // Override animation color for testing 26 // Override animation color for testing
27 // FIXME: Set animation name of Web Animation instead; not supported yet 27 // FIXME: Set animation name of Web Animation instead; not supported yet
28 WebInspector.AnimationUI.Color = function() { return "black"; } 28 Animation.AnimationUI.Color = function() { return "black"; }
29 29
30 WebInspector.viewManager.showView("animations"); 30 UI.viewManager.showView("animations");
31 var timeline = self.runtime.sharedInstance(WebInspector.AnimationTimeline); 31 var timeline = self.runtime.sharedInstance(Animation.AnimationTimeline);
32 InspectorTest.evaluateInPage("startAnimation()"); 32 InspectorTest.evaluateInPage("startAnimation()");
33 InspectorTest.waitForAnimationAdded(step2); 33 InspectorTest.waitForAnimationAdded(step2);
34 34
35 function step2(group) 35 function step2(group)
36 { 36 {
37 InspectorTest.addResult(timeline._groupBuffer.indexOf(group) !== -1); 37 InspectorTest.addResult(timeline._groupBuffer.indexOf(group) !== -1);
38 InspectorTest.waitForAnimationAdded(step3); 38 InspectorTest.waitForAnimationAdded(step3);
39 InspectorTest.evaluateInPage("startAnimationWithNegativeStartTime()"); 39 InspectorTest.evaluateInPage("startAnimationWithNegativeStartTime()");
40 } 40 }
41 41
42 function step3(group) 42 function step3(group)
43 { 43 {
44 InspectorTest.addResult(timeline._groupBuffer.indexOf(group) !== -1); 44 InspectorTest.addResult(timeline._groupBuffer.indexOf(group) !== -1);
45 InspectorTest.completeTest(); 45 InspectorTest.completeTest();
46 } 46 }
47 } 47 }
48 48
49 </script> 49 </script>
50 </head> 50 </head>
51 51
52 <body onload="runTest()"> 52 <body onload="runTest()">
53 <p> 53 <p>
54 Tests that animation with negative start delay gets added. 54 Tests that animation with negative start delay gets added.
55 </p> 55 </p>
56 56
57 <div id="node" style="background-color: red; height: 100px"></div> 57 <div id="node" style="background-color: red; height: 100px"></div>
58 58
59 </body> 59 </body>
60 </html> 60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698