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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/update-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 <style> 3 <style>
4 .layer { 4 .layer {
5 position: absolute; 5 position: absolute;
6 width: 20px; 6 width: 20px;
7 height: 20px; 7 height: 20px;
8 transform: translateZ(10px); 8 transform: translateZ(10px);
9 } 9 }
10 </style> 10 </style>
11 <script src="../../../http/tests/inspector/inspector-test.js"></script> 11 <script src="../../../http/tests/inspector/inspector-test.js"></script>
12 <script src="../../../http/tests/inspector/timeline-test.js"></script> 12 <script src="../../../http/tests/inspector/timeline-test.js"></script>
13 <script> 13 <script>
14 14
15 function doActions(callback) 15 function doActions(callback)
16 { 16 {
17 var layer = document.createElement("div"); 17 var layer = document.createElement("div");
18 layer.classList.add("layer"); 18 layer.classList.add("layer");
19 document.getElementById("parent-layer").appendChild(layer); 19 document.getElementById("parent-layer").appendChild(layer);
20 20
21 var callback;
22 var promise = new Promise((fulfill) => callback = fulfill);
21 if (window.testRunner) 23 if (window.testRunner)
22 testRunner.layoutAndPaintAsyncThen(callback); 24 testRunner.layoutAndPaintAsyncThen(callback);
caseq 2016/08/05 17:56:42 inline into new Promise(...)
kozy 2016/08/10 01:21:14 Done.
25 return promise;
23 } 26 }
24 27
25 function test() 28 function test()
26 { 29 {
27 InspectorTest.invokeWithTracing("doActions", onTracingComplete); 30 InspectorTest.invokeWithTracing("doActions", onTracingComplete);
28 function onTracingComplete() 31 function onTracingComplete()
29 { 32 {
30 var events = InspectorTest.timelineModel().inspectedTargetEvents(); 33 var events = InspectorTest.timelineModel().inspectedTargetEvents();
31 for (var i = 0; i < events.length; ++i) { 34 for (var i = 0; i < events.length; ++i) {
32 var event = events[i]; 35 var event = events[i];
(...skipping 10 matching lines...) Expand all
43 </script> 46 </script>
44 </head> 47 </head>
45 48
46 <body onload="runTest()"> 49 <body onload="runTest()">
47 <p> 50 <p>
48 Tests the instrumentation of UpdateLayerTree event 51 Tests the instrumentation of UpdateLayerTree event
49 </p> 52 </p>
50 <div id="parent-layer"></div> 53 <div id="parent-layer"></div>
51 </body> 54 </body>
52 </html> 55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698