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