Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/layer-tree.html

Issue 2434393002: Timeline: promisify paint profiler and Layers panel, part I (Closed)
Patch Set: Timeline: promisify paint profiler and Layers panel, part I Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 src="../../../http/tests/inspector/layers-test.js"></script> 5 <script src="../../../http/tests/inspector/layers-test.js"></script>
6 <script src="../../tracing-test.js"></script> 6 <script src="../../tracing-test.js"></script>
7 7
8 <script> 8 <script>
9 function doActions() 9 function doActions()
10 { 10 {
(...skipping 10 matching lines...) Expand all
21 21
22 function test() 22 function test()
23 { 23 {
24 WebInspector.panels.timeline._captureLayersAndPicturesSetting.set(true); 24 WebInspector.panels.timeline._captureLayersAndPicturesSetting.set(true);
25 25
26 InspectorTest.invokeAsyncWithTimeline("doActions", step1); 26 InspectorTest.invokeAsyncWithTimeline("doActions", step1);
27 function step1() 27 function step1()
28 { 28 {
29 var frames = InspectorTest.timelineFrameModel().frames(); 29 var frames = InspectorTest.timelineFrameModel().frames();
30 var lastFrame = InspectorTest.timelineFrameModel().frames().peekLast(); 30 var lastFrame = InspectorTest.timelineFrameModel().frames().peekLast();
31 var deferredLayerTree = lastFrame.layerTree; 31 lastFrame.layerTree.layerTreePromise().then(InspectorTest.safeWrap(layer TreeResolved))
32 deferredLayerTree.resolve(InspectorTest.safeWrap(layerTreeResolved));
33 } 32 }
34 33
35 function layerTreeResolved(layerTreeModel) 34 function layerTreeResolved(layerTreeModel)
36 { 35 {
37 InspectorTest.dumpLayerTree(undefined, layerTreeModel.contentRoot()); 36 InspectorTest.dumpLayerTree(undefined, layerTreeModel.contentRoot());
38 InspectorTest.completeTest(); 37 InspectorTest.completeTest();
39 } 38 }
40 } 39 }
41 </script> 40 </script>
42 41
43 <body onload="runTestAfterDisplay()"> 42 <body onload="runTestAfterDisplay()">
44 Tests that LayerTreeModel successfully imports layers from a trace. 43 Tests that LayerTreeModel successfully imports layers from a trace.
45 </p> 44 </p>
46 <div id="a" style="width: 200px; height: 200px" class="layer"> 45 <div id="a" style="width: 200px; height: 200px" class="layer">
47 <div class="layer" id="b1" style="width: 150px; height: 100px"></div> 46 <div class="layer" id="b1" style="width: 150px; height: 100px"></div>
48 <div id="b2" class="layer" style="width: 140px; height: 110px"> 47 <div id="b2" class="layer" style="width: 140px; height: 110px">
49 <div id="c" class="layer" style="width: 100px; height: 90px"></div> 48 <div id="c" class="layer" style="width: 100px; height: 90px"></div>
50 </div> 49 </div>
51 <div id="b3" class="layer" style="width: 140px; height: 110px"></div> 50 <div id="b3" class="layer" style="width: 140px; height: 110px"></div>
52 </div> 51 </div>
53 </body> 52 </body>
54 </html> 53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698