| 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 function display(callback) |
| 7 { |
| 8 requestAnimationFrame(testRunner.displayAsyncThen.bind(testRunner, callback)
); |
| 9 } |
| 6 | 10 |
| 7 function test() | 11 function test() |
| 8 { | 12 { |
| 9 InspectorTest.startTimeline(function() { InspectorTest.reloadPage(pageReload
ed); }); | 13 InspectorTest.startTimeline(function() { InspectorTest.reloadPage(pageReload
ed); }); |
| 10 | 14 |
| 11 function pageReloaded() | 15 function pageReloaded() |
| 12 { | 16 { |
| 13 InspectorTest.stopTimeline(finish); | 17 InspectorTest.invokePageFunctionAsync("display", function() { |
| 18 InspectorTest.stopTimeline(finish); |
| 19 }); |
| 14 } | 20 } |
| 15 | 21 |
| 16 function finish() | 22 function finish() |
| 17 { | 23 { |
| 18 InspectorTest.addResult("Model records:"); | 24 InspectorTest.addResult("Model records:"); |
| 19 InspectorTest.printTimelineRecords("MarkDOMContent"); | 25 InspectorTest.printTimelineRecords("MarkDOMContent"); |
| 20 InspectorTest.printTimelineRecords("MarkLoad"); | 26 InspectorTest.printTimelineRecords("MarkLoad"); |
| 27 InspectorTest.printTimelineRecords("MarkFirstPaint"); |
| 21 InspectorTest.addResult("Timestamp records:"); | 28 InspectorTest.addResult("Timestamp records:"); |
| 22 InspectorTest.printTimestampRecords("MarkDOMContent"); | 29 InspectorTest.printTimestampRecords("MarkDOMContent"); |
| 23 InspectorTest.printTimestampRecords("MarkLoad"); | 30 InspectorTest.printTimestampRecords("MarkLoad"); |
| 31 InspectorTest.printTimestampRecords("MarkFirstPaint"); |
| 24 InspectorTest.completeTest(); | 32 InspectorTest.completeTest(); |
| 25 } | 33 } |
| 26 } | 34 } |
| 27 | 35 |
| 28 </script> | 36 </script> |
| 29 </head> | 37 </head> |
| 30 | 38 |
| 31 <body onload="runTest()"> | 39 <body onload="runTestAfterDisplay()"> |
| 32 <p> | 40 <p> |
| 33 Tests the load event. | 41 Tests the load event. |
| 34 </p> | 42 </p> |
| 35 | 43 |
| 36 </body> | 44 </body> |
| 37 </html> | 45 </html> |
| OLD | NEW |