[WebSocket] WebSocket object should fire a simple event named error when it is requir...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 10:52:12 +0000 (10:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 10:52:12 +0000 (10:52 +0000)
commit304e8e4ef385514845fd2eb087b9c5bbdc86175d
tree342c68eb1f17404a4f08a9fc5eae20549e5b7ed0
parent7fa9afe29f16006bd982722ac114dcc060d5e638
[WebSocket] WebSocket object should fire a simple event named error when it is required to fail the websocket connection.
https://bugs.webkit.org/show_bug.cgi?id=86958

Source/WebCore:

Patch by Li Yin <li.yin@intel.com> on 2012-05-22
Reviewed by Kent Tamura.

Spec:http://dev.w3.org/html5/websockets/#feedback-from-the-protocol
If the user agent was required to fail the websocket connection or the
WebSocket connection is closed with prejudice, fire a simple event
named error at the WebSocket object.

Tests: http/tests/websocket/tests/hybi/close.html

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveMessageError):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::fail):

LayoutTests:

Spec:http://dev.w3.org/html5/websockets/#feedback-from-the-protocol
If the user agent was required to fail the websocket connection or the
WebSocket connection is closed with prejudice, fire a simple event
named error at the WebSocket object.

Patch by Li Yin <li.yin@intel.com> on 2012-05-22
Reviewed by Kent Tamura.

* http/tests/websocket/tests/hybi/close-expected.txt:
* http/tests/websocket/tests/hybi/close.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/websocket/tests/hybi/close-expected.txt
LayoutTests/http/tests/websocket/tests/hybi/close.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.cpp