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..5d30523644293eccbd89ca3080b0e5437842f8e2 |
--- /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 scheme = location.protocol.replace('http', 'ws'); |
+var url = scheme + 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> |