Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / net / data / websocket / count_connection.html
blobb523a4740f710df33d1352520ce793ebc92cd730
1 <!doctype html>
2 <html>
3 <head>
4 <title>Connect to a WebSocket server</title>
5 <script type="text/javascript">
6 var protocol = location.protocol.replace('http', 'ws');
7 var url = protocol + '//' + location.host + '/count-connection';
9 // Do connection test.
10 var ws = new WebSocket(url);
12 ws.onmessage = function(e) {
13 document.title = (e.data === 'open: 1, closed: 1' ? 'PASS' : 'FAIL');
16 ws.onclose = function() {
17 document.title = 'FAIL';
20 </script>
21 </head>
22 </html>