Bug 66649

Summary: [Chromium] [WebSocket] Add a test to reproduce chromium bug on close before open
Product: WebKit Reporter: Takashi Toyoshima <toyoshim>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, tkent, webkit.review.bot, yutak
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Takashi Toyoshima 2011-08-22 00:14:01 PDT
On Chromium port, WebSocket.onclose() callback doesn't be called when JavaScript call close() before onopen() is called.
Current test to check this scenario, access to ws://127.0.0.1:8880/websocket/tests/hybi/handing-handshake.
This URL cause close event by another reason, so the problem is hidden by chance.
Comment 1 Takashi Toyoshima 2011-08-22 00:24:50 PDT
Created attachment 104650 [details]
Patch
Comment 2 Kent Tamura 2011-08-22 01:05:52 PDT
(In reply to comment #1)
> Created an attachment (id=104650) [details]
> Patch

Do you need review? The review flag is not set.
Comment 3 Takashi Toyoshima 2011-08-22 01:34:49 PDT
Thank you for comment.
I'll check it in Chromium if this test reproduce the issue.
After that, I'll check the review flag.

Thanks!
Comment 4 Takashi Toyoshima 2011-08-22 02:03:24 PDT
DumpRenderTree/chromium passes this test because its IPC implementation is different from one of chromium itself.
But, manual test by Chrome fails. So I think it's worth to submit.
Comment 5 Kent Tamura 2011-08-22 02:04:51 PDT
Comment on attachment 104650 [details]
Patch

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

> LayoutTests/platform/chromium/test_expectations.txt:173
> +// Temporally disable until WebSocket IPC bug is fixed.
> +BUGCR93698 SKIP : http/tests/websocket/tests/hybi/close-before-open.html = PASS TIMEOUT FAIL
> +

You said DRT/Chromium passed this test.  So we don't need this part.
Comment 6 Takashi Toyoshima 2011-08-22 02:13:54 PDT
Created attachment 104652 [details]
Patch
Comment 7 Kent Tamura 2011-08-22 03:53:21 PDT
Comment on attachment 104652 [details]
Patch

ok
Comment 8 WebKit Review Bot 2011-08-22 05:06:50 PDT
Comment on attachment 104652 [details]
Patch

Clearing flags on attachment: 104652

Committed r93505: <http://trac.webkit.org/changeset/93505>
Comment 9 WebKit Review Bot 2011-08-22 05:06:55 PDT
All reviewed patches have been landed.  Closing bug.