Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / net / data / websocket / connect_to.html
blob05c653fc5d2ab9a333efea5b4c5eee83a03bbe07
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>test ws connection</title>
5 <script type="text/javascript">
7 var href = window.location.href;
8 var queryBegin = href.indexOf('?url=');
9 if (queryBegin == -1) {
10 console.log("Failed to find ?url= in URL");
11 document.title = 'FAIL';
12 throw "FAILURE";
14 var url = href.slice(queryBegin + 5);
16 // Do connection test.
17 var ws = new WebSocket(url);
19 ws.onopen = function()
21 // Set document title to 'PASS'. The test observer catches this title changes
22 // to know the result.
23 document.title = 'PASS';
26 ws.onclose = function()
28 // Set document title to 'FAIL'.
29 document.title = 'FAIL';
32 </script>
33 </head>
34 </html>