[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