Summary: | WebSocket: Fix bufferedAmount after WebSocket is closed | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yuta Kitamura <yutak> | ||||||
Component: | WebCore Misc. | Assignee: | Yuta Kitamura <yutak> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, ap, tkent, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 50099 | ||||||||
Attachments: |
|
Description
Yuta Kitamura
2011-08-31 23:14:09 PDT
Created attachment 105901 [details]
Patch
Comment on attachment 105901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105901&action=review > LayoutTests/http/tests/websocket/tests/hybi/bufferedAmount-after-close.html:25 > +function getExpectedFramingOverhead(payloadSize) > +{ > + var overhead = 2 + 4; // Base header size and masking key size. > + if (payloadSize > 0xFFFF) > + overhead += 8; > + else if (payloadSize > 125) > + overhead += 2; > + return overhead; > +} Copying the code logic in C++ to the test code makes the test meaningless. We should have constant values of the overheads for each test cases. > LayoutTests/http/tests/websocket/tests/hybi/bufferedAmount-after-close.html:59 > +function doTest(message) nit: doTest -> testBufferedAmount ? Created attachment 105918 [details]
Patch v2
Comment on attachment 105901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105901&action=review >> LayoutTests/http/tests/websocket/tests/hybi/bufferedAmount-after-close.html:25 >> +} > > Copying the code logic in C++ to the test code makes the test meaningless. We should have constant values of the overheads for each test cases. Fixed. >> LayoutTests/http/tests/websocket/tests/hybi/bufferedAmount-after-close.html:59 >> +function doTest(message) > > nit: doTest -> testBufferedAmount ? Fixed. Comment on attachment 105918 [details]
Patch v2
ok
Comment on attachment 105918 [details] Patch v2 Clearing flags on attachment: 105918 Committed r94282: <http://trac.webkit.org/changeset/94282> All reviewed patches have been landed. Closing bug. |