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

Side by Side Diff: net/data/websocket/websocket_shared_worker.html

Issue 416333004: Revert of [WebSocket] Send a close frame when the renderer process is gone. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « net/data/websocket/split_packet_check.html ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 <div id=result></div> 3 <div id=result></div>
4 <script> 4 <script>
5 function log(message) 5 function log(message)
6 { 6 {
7 document.getElementById("result").innerHTML += message + "<br>"; 7 document.getElementById("result").innerHTML += message + "<br>";
8 } 8 }
9 var worker = new SharedWorker("websocket_worker_simple.js"); 9 var worker = new SharedWorker("websocket_worker_simple.js");
10 var protocol = location.protocol.replace('http', 'ws'); 10 var href = window.location.href;
11 var url = protocol + '//' + location.host + '/echo-with-no-extension'; 11 var hostBegin = href.indexOf("/") + 2;
12 var hostEnd = href.lastIndexOf(":");
13 var host = href.slice(hostBegin, hostEnd);
14 var portBegin = hostEnd + 1;
15 var portEnd = href.lastIndexOf("/");
16 var port = href.slice(portBegin, portEnd);
17 var url = "ws://" + host + ":" + port + "/echo-with-no-extension";
12 worker.port.onmessage = function (evt) { 18 worker.port.onmessage = function (evt) {
13 log(evt.data); 19 log(evt.data);
14 if (evt.data == "DONE") { 20 if (evt.data == "DONE") {
15 document.title = "OK"; 21 document.title = "OK";
16 } else { 22 } else {
17 document.title = "FAIL"; 23 document.title = "FAIL";
18 } 24 }
19 }; 25 };
20 worker.port.postMessage(url); 26 worker.port.postMessage(url);
21 27
22 </script> 28 </script>
23 </body> 29 </body>
24 </html> 30 </html>
31
OLDNEW
« no previous file with comments | « net/data/websocket/split_packet_check.html ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698