• commit-queue@webkit.org's avatar
    [WebSocket] WebSocket object in Worker Context should fire error event when it fails connection. · 02093c4f
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=88744
    
    Patch by Li Yin <li.yin@intel.com> on 2012-06-14
    Reviewed by Kent Tamura.
    
    Source/WebCore:
    
    Spec:http://dev.w3.org/html5/websockets/#feedback-from-the-protocol
    The behavior of firing error event in Document has been implemented in Committed r117944.
    WebSocket in WorkerContext is also required to fire error event.
    
    Test: http/tests/websocket/tests/hybi/workers/close.html
    
    * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
    (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
    (WebCore):
    (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback):
    * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
    (ThreadableWebSocketChannelClientWrapper):
    * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
    (WebCore::workerContextDidReceiveMessageError):
    (WebCore):
    (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
    * Modules/websockets/WorkerThreadableWebSocketChannel.h:
    (Peer):
    
    LayoutTests:
    
    * http/tests/websocket/tests/hybi/workers/close-expected.txt:
    * http/tests/websocket/tests/hybi/workers/resources/close.js:
    (testPassed):
    (runCodeTest.else.ws.onerror):
    (runCodeTest):
    (runReasonTest.else.ws.onerror):
    (runReasonTest):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    02093c4f
WorkerThreadableWebSocketChannel.h 8.58 KB