| 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 | 16 |
| 17 function test() | 17 function test() |
| 18 { | 18 { |
| 19 WebInspector.TimelineModel._doNotAssignEndTime = true; | |
| 20 InspectorTest.startTimeline(function() { | 19 InspectorTest.startTimeline(function() { |
| 21 InspectorTest.evaluateInPage("performActions()"); | 20 InspectorTest.evaluateInPage("performActions()"); |
| 22 }); | 21 }); |
| 23 | 22 |
| 24 InspectorTest.waitForRecordType("CancelAnimationFrame", finish); | 23 InspectorTest.waitForRecordType("CancelAnimationFrame", finish); |
| 25 | 24 |
| 26 function finish() | 25 function finish() |
| 27 { | 26 { |
| 28 InspectorTest.printTimelineRecords("RequestAnimationFrame"); | 27 InspectorTest.printTimelineRecords("RequestAnimationFrame"); |
| 29 InspectorTest.printTimelineRecords("FireAnimationFrame"); | 28 InspectorTest.printTimelineRecords("FireAnimationFrame"); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 41 <body onload="runTest()"> | 40 <body onload="runTest()"> |
| 42 <p> | 41 <p> |
| 43 Tests the Timeline events for Animation Frame feature | 42 Tests the Timeline events for Animation Frame feature |
| 44 </p> | 43 </p> |
| 45 <div id="animation"> | 44 <div id="animation"> |
| 46 | 45 |
| 47 </div> | 46 </div> |
| 48 | 47 |
| 49 </body> | 48 </body> |
| 50 </html> | 49 </html> |
| OLD | NEW |