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