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

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

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: Created 4 years, 4 months 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(callback) 9 function doActions()
10 { 10 {
11 var callback;
12 var promise = new Promise((fulfill) => callback = fulfill);
11 var div = document.createElement("div"); 13 var div = document.createElement("div");
12 div.id = "b4"; 14 div.id = "b4";
13 document.getElementById("a").appendChild(div); 15 document.getElementById("a").appendChild(div);
14 16
15 // Make sure to force commit, otherwise some owner nodes will be missing. 17 // Make sure to force commit, otherwise some owner nodes will be missing.
16 var style = document.createElement("style"); 18 var style = document.createElement("style");
17 style.textContent = ".layer { transform: translateZ(10px); opacity: 0.8; }"; 19 style.textContent = ".layer { transform: translateZ(10px); opacity: 0.8; }";
18 document.head.appendChild(style); 20 document.head.appendChild(style);
19 generateFrames(3, callback); 21 generateFrames(3, callback);
caseq 2016/08/05 17:56:42 Yeah, let's make generateFrames() return promise.
kozy 2016/08/10 01:21:14 Done.
22 return promise;
20 } 23 }
21 24
22 function test() 25 function test()
23 { 26 {
24 WebInspector.panels.timeline._captureLayersAndPicturesSetting.set(true); 27 WebInspector.panels.timeline._captureLayersAndPicturesSetting.set(true);
25 28
26 InspectorTest.invokeAsyncWithTimeline("doActions", step1); 29 InspectorTest.invokeAsyncWithTimeline("doActions", step1);
27 function step1() 30 function step1()
28 { 31 {
29 var frames = InspectorTest.timelineFrameModel().frames(); 32 var frames = InspectorTest.timelineFrameModel().frames();
(...skipping 16 matching lines...) Expand all
46 </p> 49 </p>
47 <div id="a" style="width: 200px; height: 200px" class="layer"> 50 <div id="a" style="width: 200px; height: 200px" class="layer">
48 <div class="layer" id="b1" style="width: 150px; height: 100px"></div> 51 <div class="layer" id="b1" style="width: 150px; height: 100px"></div>
49 <div id="b2" class="layer" style="width: 140px; height: 110px"> 52 <div id="b2" class="layer" style="width: 140px; height: 110px">
50 <div id="c" class="layer" style="width: 100px; height: 90px"></div> 53 <div id="c" class="layer" style="width: 100px; height: 90px"></div>
51 </div> 54 </div>
52 <div id="b3" class="layer" style="width: 140px; height: 110px"></div> 55 <div id="b3" class="layer" style="width: 140px; height: 110px"></div>
53 </div> 56 </div>
54 </body> 57 </body>
55 </html> 58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698