| 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("MarkDOMContent", 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 InspectorTest.printTimelineRecords("MarkDOMContent"); | 18 InspectorTest.printTimelineRecords("MarkDOMContent"); |
| 24 InspectorTest.completeTest(); | 19 InspectorTest.completeTest(); |
| 25 } | 20 } |
| 26 } | 21 } |
| 27 | 22 |
| 28 </script> | 23 </script> |
| 29 </head> | 24 </head> |
| 30 | 25 |
| 31 <body onload="runTest()"> | 26 <body onload="runTest()"> |
| 32 <p> | 27 <p> |
| 33 Tests the DOM content loaded event. | 28 Tests the DOM content loaded event. |
| 34 </p> | 29 </p> |
| 35 | 30 |
| 36 </body> | 31 </body> |
| 37 </html> | 32 </html> |
| OLD | NEW |