Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing / frame-model-instrumentation.html
blob73abca0c685b343d309d3f55bfeba4df33df70bc
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script src="../tracing-test.js"></script>
7 <script>
8 function doActions(callback)
10 generateFrames(3, callback);
13 function test()
15 WebInspector.panels.timeline._captureLayersAndPicturesSetting.set(true);
16 InspectorTest.invokeAsyncWithTimeline("doActions", InspectorTest.safeWrap(dumpLastFrame));
17 function dumpLastFrame()
19 var frames = InspectorTest.timelineFrameModel().frames();
20 var lastFrame = InspectorTest.timelineFrameModel().frames().peekLast();
21 if (lastFrame) {
22 InspectorTest.addResult("layerTree: " + typeof lastFrame.layerTree);
23 InspectorTest.addResult("mainFrameId: " + typeof lastFrame._mainFrameId);
24 InspectorTest.addResult("paints: " + (lastFrame.paints && lastFrame.paints.length ? "present" : "absent"));
25 } else {
26 InspectorTest.addResult("FAIL: there was no frame");
28 InspectorTest.completeTest();
31 </script>
33 <body onload="runTestAfterDisplay()">
34 </body>
35 </html>