Bug 88744 - [WebSocket] WebSocket object in Worker Context should fire error event when it fails connection.
Summary: [WebSocket] WebSocket object in Worker Context should fire error event when i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Li Yin
URL:
Keywords:
Depends on:
Blocks: 87336
  Show dependency treegraph
 
Reported: 2012-06-10 20:14 PDT by Li Yin
Modified: 2012-06-14 00:22 PDT (History)
7 users (show)

See Also:


Attachments
Patch (10.19 KB, patch)
2012-06-10 20:40 PDT, Li Yin
no flags Details | Formatted Diff | Diff
Patch (10.20 KB, patch)
2012-06-11 00:59 PDT, Li Yin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Li Yin 2012-06-10 20:14:56 PDT
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.

This bug is similar with Bug 86958, but it is still required to fix in Worker Context.
Comment 1 Li Yin 2012-06-10 20:40:18 PDT
Created attachment 146770 [details]
Patch
Comment 2 Yuta Kitamura 2012-06-11 00:39:52 PDT
Comment on attachment 146770 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=146770&action=review

Looks okay except for one nitpick.

> LayoutTests/http/tests/websocket/tests/hybi/workers/resources/close.js:14
> +function testPassed(message)
> +{
> +    postMessage("Pass: " + message);
> +}

The output should look similar to postResult()'s.
Comment 3 Li Yin 2012-06-11 00:43:52 PDT
(In reply to comment #2)
> (From update of attachment 146770 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=146770&action=review
> 
> Looks okay except for one nitpick.
> 
> > LayoutTests/http/tests/websocket/tests/hybi/workers/resources/close.js:14
> > +function testPassed(message)
> > +{
> > +    postMessage("Pass: " + message);
> > +}
> 
> The output should look similar to postResult()'s.

OK, I will change the style, thanks for your review.
Comment 4 Li Yin 2012-06-11 00:51:44 PDT
(In reply to comment #2)
> (From update of attachment 146770 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=146770&action=review
> 
> Looks okay except for one nitpick.
> 
> > LayoutTests/http/tests/websocket/tests/hybi/workers/resources/close.js:14
> > +function testPassed(message)
> > +{
> > +    postMessage("Pass: " + message);
> > +}
> 
> The output should look similar to postResult()'s.

postResult()'s style looks strange.
PASS PASS: ****, maybe one PASS is enough.
Maybe style of http/tests/websocket/tests/hybi/close.html looks more nice :)
Comment 5 Li Yin 2012-06-11 00:59:04 PDT
Created attachment 146803 [details]
Patch
Comment 6 Li Yin 2012-06-12 15:29:08 PDT
Hi Kent,
   Could you have a look? 
   Thanks in advance.
Comment 7 Li Yin 2012-06-13 23:50:52 PDT
Thanks Kent for your review.
Comment 8 WebKit Review Bot 2012-06-14 00:22:26 PDT
Comment on attachment 146803 [details]
Patch

Clearing flags on attachment: 146803

Committed r120291: <http://trac.webkit.org/changeset/120291>
Comment 9 WebKit Review Bot 2012-06-14 00:22:31 PDT
All reviewed patches have been landed.  Closing bug.