| 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);
|
|
|