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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/tracing/websocket/timeline-websocket-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="../../inspector-test.js"></script> 3 <script src="../../inspector-test.js"></script>
4 <script src="../../timeline-test.js"></script> 4 <script src="../../timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function performActions(callback) 7 function performActions()
8 { 8 {
9 var ws = new WebSocket("ws://127.0.0.1:8880/simple"); 9 var ws = new WebSocket("ws://127.0.0.1:8880/simple");
10 ws.onclose = callback; 10 return new Promise((fulfill) => ws.onclose = fulfill);
11 } 11 }
12 12
13 function test() 13 function test()
14 { 14 {
15 InspectorTest.invokeAsyncWithTimeline("performActions", finish); 15 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
16 16
17 function finish() 17 function finish()
18 { 18 {
19 InspectorTest.printTimelineRecordsWithDetails("WebSocketCreate"); 19 InspectorTest.printTimelineRecordsWithDetails("WebSocketCreate");
20 InspectorTest.printTimelineRecordsWithDetails("WebSocketSendHandshakeReq uest"); 20 InspectorTest.printTimelineRecordsWithDetails("WebSocketSendHandshakeReq uest");
21 InspectorTest.printTimelineRecordsWithDetails("WebSocketReceiveHandshake Response"); 21 InspectorTest.printTimelineRecordsWithDetails("WebSocketReceiveHandshake Response");
22 InspectorTest.printTimelineRecordsWithDetails("WebSocketDestroy"); 22 InspectorTest.printTimelineRecordsWithDetails("WebSocketDestroy");
23 InspectorTest.completeTest(); 23 InspectorTest.completeTest();
24 } 24 }
25 } 25 }
26 26
27 if (!window.testRunner) 27 if (!window.testRunner)
28 setTimeout(performActions, 2000); 28 setTimeout(performActions, 2000);
29 29
30 </script> 30 </script>
31 </head> 31 </head>
32 32
33 <body onload="runTest()"> 33 <body onload="runTest()">
34 <p> 34 <p>
35 Tests the Timeline events for WebSocket 35 Tests the Timeline events for WebSocket
36 </p> 36 </p>
37 37
38 </body> 38 </body>
39 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698