Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: LayoutTests/http/tests/websocket/receive-pong-with-payload.html

Issue 788923007: Layout test to verify pong message from the server. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Apply changes suggested by tyoshino. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/websocket/receive-pong-with-payload-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/websocket/receive-pong-with-payload.html
diff --git a/LayoutTests/http/tests/websocket/receive-pong-with-payload.html b/LayoutTests/http/tests/websocket/receive-pong-with-payload.html
new file mode 100644
index 0000000000000000000000000000000000000000..2864225a876ba259508058b7c954bd1b84fb88a6
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/receive-pong-with-payload.html
@@ -0,0 +1,27 @@
+<!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/receive-pong-with-payload";
+var ws = new WebSocket(url);
+
+var message;
+ws.onmessage = function(event)
+{
+ message = event.data;
+ shouldBeEqualToString("message", "sent pong");
+ ws.close();
+};
+
+var wasClean;
+ws.onclose = function(event)
+{
+ wasClean = event.wasClean;
+ shouldBeTrue("wasClean");
+ finishJSTest();
+};
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/http/tests/websocket/receive-pong-with-payload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698