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(); |
}; |