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

Unified Diff: net/data/websocket/connect.html

Issue 390773002: [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, 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 side-by-side diff with in-line comments
Download patch
Index: net/data/websocket/connect.html
diff --git a/net/data/websocket/connect_check.html b/net/data/websocket/connect.html
similarity index 51%
copy from net/data/websocket/connect_check.html
copy to net/data/websocket/connect.html
index 4a1ca8c5dfc0b7cb86b86f019a3a4038db867f35..3757c4d808c0fa6b22a74bb90b7b634cbbf8e481 100644
--- a/net/data/websocket/connect_check.html
+++ b/net/data/websocket/connect.html
@@ -1,9 +1,8 @@
-<!DOCTYPE html>
+<!doctype html>
<html>
<head>
-<title>test ws connection</title>
+<title>Connect to a WebSocket server</title>
<script type="text/javascript">
-
var href = window.location.href;
Adam Rice 2014/07/14 10:17:20 See https://code.google.com/p/chromium/codesearch#
yhirano 2014/07/14 11:24:35 Done.
var hostBegin = href.indexOf('/') + 2;
var hostEnd = href.lastIndexOf(':');
@@ -12,24 +11,17 @@ var portBegin = hostEnd + 1;
var portEnd = href.lastIndexOf('/');
var port = href.slice(portBegin, portEnd);
var scheme = href.indexOf('https') >= 0 ? 'wss' : 'ws';
-var url = scheme + '://' + host + ':' + port + '/echo-with-no-extension';
+var url = scheme + '://' + host + ':' + port + '/count-connection';
-// Do connection test.
var ws = new WebSocket(url);
-ws.onopen = function()
-{
- // Set document title to 'PASS'. The test observer catches this title changes
- // to know the result.
- document.title = 'PASS';
-}
-
-ws.onclose = function()
-{
- // Set document title to 'FAIL'.
- document.title = 'FAIL';
-}
+ws.onopen = function() {
+ document.title = 'CONNECTED';
+};
+ws.onclose = function() {
+ document.title = 'CLOSED';
+};
</script>
</head>
</html>

Powered by Google App Engine
This is Rietveld 408576698