Diff
Modified: trunk/LayoutTests/ChangeLog (86731 => 86732)
--- trunk/LayoutTests/ChangeLog 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/ChangeLog 2011-05-18 03:50:34 UTC (rev 86732)
@@ -1,3 +1,27 @@
+2011-05-17 Yuta Kitamura <[email protected]>
+
+ Reviewed by Kent Tamura.
+
+ WebSocket: Add CLOSING state
+ https://bugs.webkit.org/show_bug.cgi?id=60878
+
+ The value of WebSocket.CLOSED has been changed from 2 to 3, we have to update
+ expected results of tests that dump WebSocket.readyState.
+
+ * fast/dom/Window/window-properties-expected.txt:
+ * http/tests/websocket/tests/bufferedAmount-after-close-expected.txt:
+ * http/tests/websocket/tests/close-on-unload-reference-in-parent-expected.txt:
+ * http/tests/websocket/tests/close-on-unload-reference-in-parent.html:
+ * http/tests/websocket/tests/handshake-error-expected.txt:
+ * http/tests/websocket/tests/script-tests/bufferedAmount-after-close.js:
+ (ws.onclose):
+ * http/tests/websocket/tests/script-tests/handshake-error.js:
+ (ws.onclose):
+ * http/tests/websocket/tests/send-after-close-on-unload-expected.txt:
+ * http/tests/websocket/tests/send-after-close-on-unload.html:
+ * http/tests/websocket/tests/simple-expected.txt:
+ * platform/qt/fast/dom/Window/window-properties-expected.txt:
+
2011-05-17 Yuzo Fujishima <[email protected]>
Unreviewed Chromium test expectation change.
Modified: trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt (86731 => 86732)
--- trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt 2011-05-18 03:50:34 UTC (rev 86732)
@@ -2040,11 +2040,13 @@
window.WebKitTransitionEvent.prototype [printed above as window.Event.prototype]
window.WebSocket [object WebSocketConstructor]
window.WebSocket.CLOSED [number]
+window.WebSocket.CLOSING [number]
window.WebSocket.CONNECTING [number]
window.WebSocket.OPEN [number]
window.WebSocket.length [number]
window.WebSocket.prototype [object WebSocketPrototype]
window.WebSocket.prototype.CLOSED [number]
+window.WebSocket.prototype.CLOSING [number]
window.WebSocket.prototype.CONNECTING [number]
window.WebSocket.prototype.OPEN [number]
window.WebSocket.prototype.addEventListener [function]
Modified: trunk/LayoutTests/http/tests/websocket/tests/bufferedAmount-after-close-expected.txt (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/bufferedAmount-after-close-expected.txt 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/bufferedAmount-after-close-expected.txt 2011-05-18 03:50:34 UTC (rev 86732)
@@ -4,7 +4,7 @@
Connected.
Closed.
-PASS ws.readyState is 2
+PASS ws.readyState is 3
PASS ws.bufferedAmount is 0
PASS ws.send('send to closed socket') is false
PASS ws.bufferedAmount is 23
Modified: trunk/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent-expected.txt (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent-expected.txt 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent-expected.txt 2011-05-18 03:50:34 UTC (rev 86732)
@@ -7,7 +7,7 @@
PASS document.childWebSocket is non-null.
PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...
PASS closedSocket is "socket1"
-PASS document.childWebSocket.readyState is 2
+PASS document.childWebSocket.readyState is 3
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent.html (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent.html 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent.html 2011-05-18 03:50:34 UTC (rev 86732)
@@ -21,7 +21,7 @@
function endTest()
{
shouldBe("closedSocket", '"socket1"');
- shouldBe("document.childWebSocket.readyState", "2");
+ shouldBe("document.childWebSocket.readyState", "3");
isSuccessfullyParsed();
if (window.layoutTestController)
layoutTestController.notifyDone();
Modified: trunk/LayoutTests/http/tests/websocket/tests/handshake-error-expected.txt (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/handshake-error-expected.txt 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/handshake-error-expected.txt 2011-05-18 03:50:34 UTC (rev 86732)
@@ -4,7 +4,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Closed.
-PASS ws.readyState is 2
+PASS ws.readyState is 3
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/websocket/tests/script-tests/bufferedAmount-after-close.js (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/script-tests/bufferedAmount-after-close.js 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/script-tests/bufferedAmount-after-close.js 2011-05-18 03:50:34 UTC (rev 86732)
@@ -21,7 +21,7 @@
ws._onclose_ = function()
{
debug("Closed.");
- shouldBe("ws.readyState", "2");
+ shouldBe("ws.readyState", "3");
shouldBe("ws.bufferedAmount", "0");
shouldBeFalse("ws.send('send to closed socket')");
// If the connection is closed, bufferedAmount attribute's value will only
Modified: trunk/LayoutTests/http/tests/websocket/tests/script-tests/handshake-error.js (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/script-tests/handshake-error.js 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/script-tests/handshake-error.js 2011-05-18 03:50:34 UTC (rev 86732)
@@ -28,7 +28,7 @@
ws._onclose_ = function()
{
debug("Closed.");
- shouldBe("ws.readyState", "2")
+ shouldBe("ws.readyState", "3")
endTest();
};
Modified: trunk/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload-expected.txt (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload-expected.txt 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload-expected.txt 2011-05-18 03:50:34 UTC (rev 86732)
@@ -8,7 +8,7 @@
PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...
PASS document.childWebSocket.send('send to closed socket') is false
PASS closedSocket is "socket1"
-PASS document.childWebSocket.readyState is 2
+PASS document.childWebSocket.readyState is 3
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload.html (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload.html 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload.html 2011-05-18 03:50:34 UTC (rev 86732)
@@ -21,7 +21,7 @@
function endTest()
{
shouldBe("closedSocket", '"socket1"');
- shouldBe("document.childWebSocket.readyState", "2");
+ shouldBe("document.childWebSocket.readyState", "3");
isSuccessfullyParsed();
if (window.layoutTestController)
layoutTestController.notifyDone();
Modified: trunk/LayoutTests/http/tests/websocket/tests/simple-expected.txt (86731 => 86732)
--- trunk/LayoutTests/http/tests/websocket/tests/simple-expected.txt 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/http/tests/websocket/tests/simple-expected.txt 2011-05-18 03:50:34 UTC (rev 86732)
@@ -5,7 +5,7 @@
Created a socket to 'ws://127.0.0.1:8880/websocket/tests/simple'; readyState 0.
Connected; readyState 1
Received: 'Hello from Simple WSH.'; readyState 1
-Closed; readyState 2.
+Closed; readyState 3.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt (86731 => 86732)
--- trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt 2011-05-18 03:50:34 UTC (rev 86732)
@@ -2038,11 +2038,13 @@
window.WebKitTransitionEvent.prototype [printed above as window.Event.prototype]
window.WebSocket [object WebSocketConstructor]
window.WebSocket.CLOSED [number]
+window.WebSocket.CLOSING [number]
window.WebSocket.CONNECTING [number]
window.WebSocket.OPEN [number]
window.WebSocket.length [number]
window.WebSocket.prototype [object WebSocketPrototype]
window.WebSocket.prototype.CLOSED [number]
+window.WebSocket.prototype.CLOSING [number]
window.WebSocket.prototype.CONNECTING [number]
window.WebSocket.prototype.OPEN [number]
window.WebSocket.prototype.addEventListener [function]
Modified: trunk/Source/WebCore/ChangeLog (86731 => 86732)
--- trunk/Source/WebCore/ChangeLog 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/Source/WebCore/ChangeLog 2011-05-18 03:50:34 UTC (rev 86732)
@@ -1,3 +1,16 @@
+2011-05-17 Yuta Kitamura <[email protected]>
+
+ Reviewed by Kent Tamura.
+
+ WebSocket: Add CLOSING state
+ https://bugs.webkit.org/show_bug.cgi?id=60878
+
+ No new tests are added because there is no change in functionality.
+
+ * platform/network/SocketStreamHandleBase.h:
+ * websockets/WebSocket.h:
+ * websockets/WebSocket.idl:
+
2011-05-16 MORITA Hajime <[email protected]>
Reviewed by Dimitri Glazkov.
Modified: trunk/Source/WebCore/platform/network/SocketStreamHandleBase.h (86731 => 86732)
--- trunk/Source/WebCore/platform/network/SocketStreamHandleBase.h 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/Source/WebCore/platform/network/SocketStreamHandleBase.h 2011-05-18 03:50:34 UTC (rev 86732)
@@ -43,7 +43,7 @@
class SocketStreamHandleBase {
public:
- enum SocketStreamState { Connecting, Open, Closed };
+ enum SocketStreamState { Connecting, Open, Closing, Closed };
virtual ~SocketStreamHandleBase() { }
SocketStreamState state() const;
Modified: trunk/Source/WebCore/websockets/WebSocket.h (86731 => 86732)
--- trunk/Source/WebCore/websockets/WebSocket.h 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/Source/WebCore/websockets/WebSocket.h 2011-05-18 03:50:34 UTC (rev 86732)
@@ -58,7 +58,8 @@
enum State {
CONNECTING = 0,
OPEN = 1,
- CLOSED = 2
+ CLOSING = 2,
+ CLOSED = 3
};
void connect(const String& url, ExceptionCode&);
Modified: trunk/Source/WebCore/websockets/WebSocket.idl (86731 => 86732)
--- trunk/Source/WebCore/websockets/WebSocket.idl 2011-05-18 03:47:01 UTC (rev 86731)
+++ trunk/Source/WebCore/websockets/WebSocket.idl 2011-05-18 03:50:34 UTC (rev 86732)
@@ -46,7 +46,8 @@
// ready state
const unsigned short CONNECTING = 0;
const unsigned short OPEN = 1;
- const unsigned short CLOSED = 2;
+ const unsigned short CLOSING = 2;
+ const unsigned short CLOSED = 3;
readonly attribute unsigned short readyState;
readonly attribute unsigned long bufferedAmount;