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

Unified Diff: LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.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
Index: LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html b/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html
index 4d79483200763c1e52faac8ad6050656bb425cbc..dc7c4846a5ffc8ec11bf179e03bf989ffa755f7f 100644
--- a/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html
+++ b/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.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();
};

Powered by Google App Engine
This is Rietveld 408576698