Index: LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html |
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html b/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html |
index 55a4d55583fd5571121b9be622bad6f9765db98b..9c338973d0b4a9b42876ee60871636372d8e4d35 100644 |
--- a/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html |
+++ b/LayoutTests/http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html |
@@ -13,6 +13,7 @@ window.jsTestIsAsync = true; |
var frameDiv; |
var closedSocket; |
+var closeCode; |
document.childWebSocket = null; |
var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/close-on-unload"); |
@@ -26,12 +27,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"'); |
shouldBe("document.childWebSocket.readyState", "3"); |
finishJSTest(); |
}; |