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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-receive-response-event.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 <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> 5 <script>
6 6
7 function performActions(callback) 7 function performActions()
8 { 8 {
9 var callback;
10 var promise = new Promise((fulfill) => callback = fulfill);
9 var image = new Image(); 11 var image = new Image();
10 image.onload = bar; 12 image.onload = bar;
11 image.src = "../resources/anImage.png"; 13 image.src = "../resources/anImage.png";
12 14
13 function bar() 15 function bar()
14 { 16 {
15 var image = new Image(); 17 var image = new Image();
16 image.onload = function(event) { callback(); } // do not pass event arg ument to the callback. 18 image.onload = function(event) { callback(); } // do not pass event arg ument to the callback.
17 image.src = "../resources/anotherImage.png"; 19 image.src = "../resources/anotherImage.png";
18 } 20 }
21 return promise;
19 } 22 }
20 23
21 function test() 24 function test()
22 { 25 {
23 WebInspector.TimelinePanel.show(); 26 WebInspector.TimelinePanel.show();
24 WebInspector.panels.timeline._model._currentTarget = WebInspector.targetMana ger.mainTarget(); 27 WebInspector.panels.timeline._model._currentTarget = WebInspector.targetMana ger.mainTarget();
25 WebInspector.panels.timeline._captureJSProfileSetting.set(false); 28 WebInspector.panels.timeline._captureJSProfileSetting.set(false);
26 InspectorTest.invokeAsyncWithTimeline("performActions", finish); 29 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
27 30
28 function finish() 31 function finish()
(...skipping 23 matching lines...) Expand all
52 </script> 55 </script>
53 </head> 56 </head>
54 57
55 <body onload="runTest()"> 58 <body onload="runTest()">
56 <p> 59 <p>
57 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc. 60 Tests the Timeline API instrumentation of a SendRequest, ReceiveResponse etc.
58 </p> 61 </p>
59 62
60 </body> 63 </body>
61 </html> 64 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698