| Index: net/data/websocket/count_connection.html
|
| diff --git a/net/data/websocket/count_connection.html b/net/data/websocket/count_connection.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b523a4740f710df33d1352520ce793ebc92cd730
|
| --- /dev/null
|
| +++ b/net/data/websocket/count_connection.html
|
| @@ -0,0 +1,22 @@
|
| +<!doctype html>
|
| +<html>
|
| +<head>
|
| +<title>Connect to a WebSocket server</title>
|
| +<script type="text/javascript">
|
| +var protocol = location.protocol.replace('http', 'ws');
|
| +var url = protocol + '//' + location.host + '/count-connection';
|
| +
|
| +// Do connection test.
|
| +var ws = new WebSocket(url);
|
| +
|
| +ws.onmessage = function(e) {
|
| + document.title = (e.data === 'open: 1, closed: 1' ? 'PASS' : 'FAIL');
|
| +}
|
| +
|
| +ws.onclose = function() {
|
| + document.title = 'FAIL';
|
| +};
|
| +
|
| +</script>
|
| +</head>
|
| +</html>
|
|
|