| 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/timeline-test.js"></script> | 4 <script src="../../http/tests/inspector/timeline-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function performActions() | 7 function performActions() |
| 8 { | 8 { |
| 9 var element = document.getElementById("animation"); | 9 var element = document.getElementById("animation"); |
| 10 var requestId = window.requestAnimationFrame(animationFrameCallback, element
); | 10 var requestId = window.requestAnimationFrame(animationFrameCallback, element
); |
| 11 function animationFrameCallback() | 11 function animationFrameCallback() |
| 12 { | 12 { |
| 13 window.cancelAnimationFrame(requestId); | 13 window.cancelAnimationFrame(requestId); |
| 14 } | 14 } |
| 15 | 15 |
| 16 if (window.testRunner) | 16 if (window.testRunner) |
| 17 testRunner.display(); | 17 testRunner.display(); |
| 18 } | 18 } |
| 19 | 19 |
| 20 function test() | 20 function test() |
| 21 { | 21 { |
| 22 WebInspector.TimelineModel._doNotAssignEndTime = true; | |
| 23 InspectorTest.startTimeline(function() { | 22 InspectorTest.startTimeline(function() { |
| 24 InspectorTest.evaluateInPage("performActions()"); | 23 InspectorTest.evaluateInPage("performActions()"); |
| 25 }); | 24 }); |
| 26 | 25 |
| 27 InspectorTest.waitForRecordType("CancelAnimationFrame", finish); | 26 InspectorTest.waitForRecordType("CancelAnimationFrame", finish); |
| 28 | 27 |
| 29 function finish() | 28 function finish() |
| 30 { | 29 { |
| 31 InspectorTest.printTimelineRecords("RequestAnimationFrame"); | 30 InspectorTest.printTimelineRecords("RequestAnimationFrame"); |
| 32 InspectorTest.printTimelineRecords("FireAnimationFrame"); | 31 InspectorTest.printTimelineRecords("FireAnimationFrame"); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 <body onload="runTest()"> | 43 <body onload="runTest()"> |
| 45 <p> | 44 <p> |
| 46 Tests the Timeline events for Animation Frame feature | 45 Tests the Timeline events for Animation Frame feature |
| 47 </p> | 46 </p> |
| 48 <div id="animation"> | 47 <div id="animation"> |
| 49 | 48 |
| 50 </div> | 49 </div> |
| 51 | 50 |
| 52 </body> | 51 </body> |
| 53 </html> | 52 </html> |
| OLD | NEW |