| OLD | NEW |
| 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 | 6 |
| 7 var player; | 7 var player; |
| 8 | 8 |
| 9 function startAnimationWithDelay() | 9 function startAnimationWithDelay() |
| 10 { | 10 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 } | 22 } |
| 23 | 23 |
| 24 function startAnimationWithStepTiming() | 24 function startAnimationWithStepTiming() |
| 25 { | 25 { |
| 26 player = node.animate([{ width: "100px", easing: "step(5, end)" }, { width:
"200px", easing: "step-start" }], 200); | 26 player = node.animate([{ width: "100px", easing: "step(5, end)" }, { width:
"200px", easing: "step-start" }], 200); |
| 27 } | 27 } |
| 28 | 28 |
| 29 function test() | 29 function test() |
| 30 { | 30 { |
| 31 InspectorTest.selectNodeWithId("node", step1); | 31 InspectorTest.selectNodeWithId("node", step1); |
| 32 var stylesPane = WebInspector.panels.elements.sidebarPanes.styles; | 32 var timeline = new WebInspector.AnimationTimeline(); |
| 33 stylesPane._toggleAnimationsControlPane(); | 33 var elementsPanel = WebInspector.ElementsPanel.instance(); |
| 34 var timeline = stylesPane._animationTimeline; | 34 elementsPanel.setWidgetBelowDOM(timeline); |
| 35 // Override timeline width for testing | 35 // Override timeline width for testing |
| 36 WebInspector.AnimationTimeline.prototype.width = function() { return 1000; } | 36 WebInspector.AnimationTimeline.prototype.width = function() { return 1000; } |
| 37 // Override animation color for testing | 37 // Override animation color for testing |
| 38 // FIXME: Set animation name of Web Animation instead; not supported yet | 38 // FIXME: Set animation name of Web Animation instead; not supported yet |
| 39 WebInspector.AnimationUI.prototype._color = function() { return "black"; } | 39 WebInspector.AnimationUI.prototype._color = function() { return "black"; } |
| 40 | 40 |
| 41 function step1() | 41 function step1() |
| 42 { | 42 { |
| 43 InspectorTest.waitForAnimationAdded(step2); | 43 InspectorTest.waitForAnimationAdded(step2); |
| 44 InspectorTest.evaluateInPage("startAnimationWithDelay()"); | 44 InspectorTest.evaluateInPage("startAnimationWithDelay()"); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 <body onload="runTest()"> | 86 <body onload="runTest()"> |
| 87 <p> | 87 <p> |
| 88 Tests the display of animations on the animation timeline. | 88 Tests the display of animations on the animation timeline. |
| 89 </p> | 89 </p> |
| 90 | 90 |
| 91 <div id="node" style="background-color: red; height: 100px"></div> | 91 <div id="node" style="background-color: red; height: 100px"></div> |
| 92 | 92 |
| 93 </body> | 93 </body> |
| 94 </html> | 94 </html> |
| OLD | NEW |