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

Unified Diff: LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html

Issue 23069004: Check WebSocket close code sent on unload (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating the code comments for landing Created 7 years, 4 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/tests/hybi/close-on-navigate-new-location-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html b/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html
index 63d9aef2e7942c6a6440c50bf6681da4bfaca74a..78b1fb2f97cb5cd89af8eec63f273d753f1ec3cf 100644
--- a/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html
+++ b/LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location.html
@@ -13,6 +13,7 @@ window.jsTestIsAsync = true;
var frameDiv;
var closedSocket;
+var closeCode;
var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/close-on-unload");
ws.onopen = function()
@@ -25,12 +26,15 @@ ws.onopen = function()
};
ws.onmessage = function(evt)
{
- closedSocket = evt.data;
+ var messageData = JSON.parse(evt.data);
+ closedSocket = messageData.message;
+ closeCode = messageData.closeCode;
ws.close();
};
ws.onclose = function()
{
shouldBe("closedSocket", '"socket1"');
+ shouldBe("closeCode", '"1001"');
finishJSTest();
};
« no previous file with comments | « no previous file | LayoutTests/http/tests/websocket/tests/hybi/close-on-navigate-new-location-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698