Index: LayoutTests/http/tests/websocket/pong-only.html |
diff --git a/LayoutTests/http/tests/websocket/pong-only.html b/LayoutTests/http/tests/websocket/pong-only.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..afd177e01402c022810a4561068b914b84c62845 |
--- /dev/null |
+++ b/LayoutTests/http/tests/websocket/pong-only.html |
@@ -0,0 +1,28 @@ |
+<!DOCTYPE HTML> |
+<script src="/js-test-resources/js-test.js"></script> |
+<script> |
+description("Test whether WebSocket correctly ignores a pong message with a payload"); |
+ |
+window.jsTestIsAsync = true; |
+ |
+var url = "ws://localhost:8880/pong-only"; |
+var ws = new WebSocket(url); |
+var wasClean; |
+var message; |
tyoshino (SeeGerritForStatus)
2015/01/05 05:19:45
let's declare these variables right above each han
Adam Rice
2015/01/05 20:24:32
Done.
|
+ |
+ws.onmessage = function(event) |
+{ |
+ message = event.data; |
+ shouldBeEqualToString("message", "sent pong"); |
+ ws.close(); |
+}; |
+ |
+ws.onclose = function(event) |
+{ |
+ wasClean = event.wasClean; |
+ shouldBeTrue("wasClean"); |
+ finishJSTest(); |
+}; |
+ |
+</script> |
+ |
tyoshino (SeeGerritForStatus)
2015/01/05 05:19:45
remove blank line?
Adam Rice
2015/01/05 20:24:32
Done.
|