3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/timeline-test.js"></script>
6 function display(callback
)
9 testRunner
.setCanOpenWindows(true);
10 var popup
= window
.open("data:text/html,<b>Hello, world</b>");
11 popup
.onload = function()
13 requestAnimationFrame(testRunner
.capturePixelsAsyncThen
.bind(testRunner
, callback
));
19 InspectorTest
.startTimeline(function() { InspectorTest
.reloadPage(pageReloaded
); });
21 function pageReloaded()
23 InspectorTest
.invokePageFunctionAsync("display", displayDone
);
26 function displayDone()
28 InspectorTest
.stopTimeline(InspectorTest
.safeWrap(finish
))
33 InspectorTest
.addResult("Model records:");
34 InspectorTest
.printTimelineRecords("MarkDOMContent");
35 InspectorTest
.printTimelineRecords("MarkLoad");
36 InspectorTest
.addResult("Timestamp records:");
37 InspectorTest
.printTimestampRecords("MarkDOMContent");
38 InspectorTest
.printTimestampRecords("MarkLoad");
39 InspectorTest
.printTimestampRecords("MarkFirstPaint");
41 var eventDividers
= InspectorTest
.timelineModel().eventDividerRecords();
42 for (var i
= 1; i
< eventDividers
.length
; ++i
)
43 InspectorTest
.assertGreaterOrEqual(eventDividers
[i
], eventDividers
[i
- 1], "Event divider timestamps should be monotonically non-decreasing");
45 InspectorTest
.completeTest();
52 <body onload=
"runTest()">