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

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

Issue 11154032: Replace testing resources for WebSocket to net/data/websocket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CQ Created 8 years, 2 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
« no previous file with comments | « net/data/websocket/client_cert.p12 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/data/websocket/connect_check.html
diff --git a/chrome/test/data/http/tests/ws.html b/net/data/websocket/connect_check.html
similarity index 74%
copy from chrome/test/data/http/tests/ws.html
copy to net/data/websocket/connect_check.html
index 9eb84ed9f218e7318205e03b8c2f78c87187bf2d..14b3da967fa19dcc0ce38d775b43f148ca2fed37 100644
--- a/chrome/test/data/http/tests/ws.html
+++ b/net/data/websocket/connect_check.html
@@ -5,11 +5,14 @@
<script type="text/javascript">
var href = window.location.href;
-var portBegin = href.lastIndexOf(':') + 1;
+var hostBegin = href.indexOf('/') + 2;
+var hostEnd = href.lastIndexOf(':');
+var host = href.slice(hostBegin, hostEnd);
+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 + '://localhost:' + port + '/websocket/tests/echo';
+var url = scheme + '://' + host + ':' + port + '/echo';
// Do connection test.
var ws = new WebSocket(url);
« no previous file with comments | « net/data/websocket/client_cert.p12 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698