Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / test / data / ssl / wss_close_slave.html
blob9bd51f775b93b102c72e0141958ad3a9dcd2b20b
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>slave tab pages which create hanging wss connection</title>
5 <script type="text/javascript">
6 var href = window.location.href;
7 var hostBegin = href.indexOf('/') + 2;
8 var hostEnd = href.lastIndexOf(':');
9 var host = href.slice(hostBegin, hostEnd);
10 var queryBegin = href.lastIndexOf('?') + 1;
11 var port = href.slice(queryBegin);
12 var url = 'wss://' + host + ':' + port;
13 var ws;
14 var cb = function() {
15 ws = new WebSocket(url);
16 ws.onclose = cb;
18 cb();
19 </script>
20 </head>
21 </html>