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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/anonymous-image-object.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: a 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 div.marker::before { 4 div.marker::before {
5 content: url(resources/test.bmp); 5 content: url(resources/test.bmp);
6 } 6 }
7 </style> 7 </style>
8 <script src="../../http/tests/inspector/inspector-test.js"></script> 8 <script src="../../http/tests/inspector/inspector-test.js"></script>
9 <script src="../../http/tests/inspector/timeline-test.js"></script> 9 <script src="../../http/tests/inspector/timeline-test.js"></script>
10 <script> 10 <script>
11 11
12 function doActions(callback) 12 function doActions()
13 { 13 {
14 var callback;
15 var promise = new Promise((fulfill) => callback = fulfill);
14 document.getElementById("marker").classList.add("marker"); 16 document.getElementById("marker").classList.add("marker");
15 var img = document.createElement("img"); 17 var img = document.createElement("img");
16 img.src = "resources/test.bmp"; 18 img.src = "resources/test.bmp";
17 img.addEventListener("load", onImageLoaded, false); 19 img.addEventListener("load", onImageLoaded, false);
18 function onImageLoaded() 20 function onImageLoaded()
19 { 21 {
20 testRunner.layoutAndPaintAsyncThen(callback); 22 testRunner.layoutAndPaintAsyncThen(callback);
21 } 23 }
24 return promise;
22 } 25 }
23 26
24 function test() 27 function test()
25 { 28 {
26 InspectorTest.invokeAsyncWithTimeline("doActions", onRecordingDone); 29 InspectorTest.invokeAsyncWithTimeline("doActions", onRecordingDone);
27 30
28 function onRecordingDone() 31 function onRecordingDone()
29 { 32 {
30 InspectorTest.addResult("DONE"); 33 InspectorTest.addResult("DONE");
31 InspectorTest.completeTest(); 34 InspectorTest.completeTest();
32 } 35 }
33 } 36 }
34 </script> 37 </script>
35 </head> 38 </head>
36 39
37 <body onload="runTest()"> 40 <body onload="runTest()">
38 <p> 41 <p>
39 Tests the Timeline instrumentation does not crash the renderer upon encountering an anonymous image render object 42 Tests the Timeline instrumentation does not crash the renderer upon encountering an anonymous image render object
40 </p> 43 </p>
41 <div id="marker"></div> 44 <div id="marker"></div>
42 </body> 45 </body>
43 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698