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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/network/websocket/initiator.html

Issue 2102003002: Revert of [Devtools] Fixed websocket initiators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/network/websocket/initiator-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../http/tests/inspector-protocol/inspector-protocol-test.js"> </script>
5 <script>
6 var ws;
7 function createSocket()
8 {
9 ws = new WebSocket("ws://localhost:8080/echo");
10 }
11
12 function test()
13 {
14 InspectorTest.eventHandler["Network.webSocketCreated"] = onWebSocketCreated;
15
16 function enableNetwork()
17 {
18 InspectorTest.log("Test started");
19 InspectorTest.sendCommand("Network.enable", {}, didEnableNetwork);
20 }
21
22 function didEnableNetwork(messageObject)
23 {
24 if (messageObject.error) {
25 InspectorTest.log("FAIL: Couldn't enable network agent" + messageObj ect.error.message);
26 InspectorTest.completeTest();
27 return;
28 }
29 InspectorTest.log("Network agent enabled");
30 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "createSoc ket()"});
31 }
32
33 function onWebSocketCreated(event)
34 {
35 var initiator = event.params.initiator;
36 InspectorTest.log("");
37 InspectorTest.log("Initiator Type: " + initiator.type);
38 var stackTrace = initiator.stack;
39 for (var i = 0; i < stackTrace.callFrames.length; ++i) {
40 var frame = stackTrace.callFrames[i];
41 InspectorTest.log("Stack #" + i);
42 if (frame.lineNumber) {
43 InspectorTest.log(" functionName: " + frame.functionName);
44 InspectorTest.log(" url: " + cleanUrl(frame.url));
45 InspectorTest.log(" lineNumber: " + frame.lineNumber);
46
47 break;
48 }
49 }
50 InspectorTest.completeTest();
51 }
52
53 function cleanUrl(url)
54 {
55 url = url.match(/\/[^\/]+$/);
56 if (url.length)
57 return url[0].substr(1);
58 return url;
59 }
60
61 enableNetwork();
62 }
63 </script>
64 </head>
65 <body onload="runTest();">
66 <p>Initiator for Websockets check fixes http://crbug.com/457811</p>
67 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/network/websocket/initiator-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698