RESOLVED FIXED180470
[Readable Streams API] Throw RangeError if a size is provided when creating a readable byte stream
https://bugs.webkit.org/show_bug.cgi?id=180470
Summary [Readable Streams API] Throw RangeError if a size is provided when creating a...
Romain Bellessort
Reported 2017-12-06 06:51:16 PST
When creating a ReadableStream with type 'bytes', no strategy size should be provided. As per updated spec (see https://github.com/whatwg/streams/pull/856), a RangeError should be thrown if size is not undefined.
Attachments
Patch (6.38 KB, patch)
2017-12-06 07:12 PST, Romain Bellessort
no flags
Patch (5.67 KB, patch)
2017-12-12 01:56 PST, Romain Bellessort
no flags
Archive of layout-test-results from ews102 for mac-elcapitan (2.19 MB, application/zip)
2017-12-12 02:52 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (2.63 MB, application/zip)
2017-12-12 03:05 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews113 for mac-elcapitan (2.89 MB, application/zip)
2017-12-12 03:18 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.21 MB, application/zip)
2017-12-12 03:20 PST, EWS Watchlist
no flags
Patch (8.32 KB, patch)
2017-12-12 06:04 PST, Romain Bellessort
no flags
Romain Bellessort
Comment 1 2017-12-06 07:12:16 PST
Xabier Rodríguez Calvar
Comment 2 2017-12-11 04:54:17 PST
Comment on attachment 328564 [details] Patch Code is ok, test is redudant as it commit da06ef1c8668bd121a461405361fc7f4615b6cd6 of WPT shows at https://github.com/w3c/web-platform-tests.git. So you want to import that test instead of creating a new one.
Romain Bellessort
Comment 3 2017-12-11 08:11:17 PST
(In reply to Xabier Rodríguez Calvar from comment #2) > Comment on attachment 328564 [details] > Patch > > Code is ok, test is redudant as it commit > da06ef1c8668bd121a461405361fc7f4615b6cd6 of WPT shows at > https://github.com/w3c/web-platform-tests.git. So you want to import that > test instead of creating a new one. WPT test targets the same behavior, but it requires other changes from the latest spec (e.g. CountQueuingStrategy and ByteLengthQueuingStrategy) which are not implemented in current WebKit implementation. Maybe I could add a comment to the test I added to indicate that it should be removed once the implementation supports CountQueuingStrategy and ByteLengthQueuingStrategy?
youenn fablet
Comment 4 2017-12-11 09:53:13 PST
> WPT test targets the same behavior, but it requires other changes from the > latest spec (e.g. CountQueuingStrategy and ByteLengthQueuingStrategy) which > are not implemented in current WebKit implementation. Maybe I could add a > comment to the test I added to indicate that it should be removed once the > implementation supports CountQueuingStrategy and ByteLengthQueuingStrategy? Does this mean that reimporting streams API will regress somehow our coverage? We resent regularly so this will happen anyhow. I like the simplicity of the test you are adding. We could land that patch and upstream the test you are adding to WPT. Once upstreamed, we would need to remove the WebKit-specific version.
Romain Bellessort
Comment 5 2017-12-12 01:02:06 PST
(In reply to youenn fablet from comment #4) > > WPT test targets the same behavior, but it requires other changes from the > > latest spec (e.g. CountQueuingStrategy and ByteLengthQueuingStrategy) which > > are not implemented in current WebKit implementation. Maybe I could add a > > comment to the test I added to indicate that it should be removed once the > > implementation supports CountQueuingStrategy and ByteLengthQueuingStrategy? > > Does this mean that reimporting streams API will regress somehow our > coverage? > We resent regularly so this will happen anyhow. > > I like the simplicity of the test you are adding. > We could land that patch and upstream the test you are adding to WPT. Once > upstreamed, we would need to remove the WebKit-specific version. I haven't checked how many tests will be impacted, but yes, coverage will regress. Corresponding WPT test already comprises a very similar test (see https://github.com/w3c/web-platform-tests/commit/da06ef1c8668bd121a461405361fc7f4615b6cd6 , line 1968), but it also adds other tests as the queuing strategy may now be an instance of CountQueuingStrategy or ByteLengthQueuingStrategy. The corresponding test will fail as all tests are gathered in the same test case. An option may be to split this test case so that only CountQueuingStrategy and ByteLengthQueuingStrategy tests fail.
Romain Bellessort
Comment 6 2017-12-12 01:29:15 PST
In fact I was wrong, CountQueuingStrategy and ByteLengthQueuingStrategy are already implemented, so the test will pass, sorry for the misunderstanding. I will prepare a new patch with the imported test. Is it ok if I just copy the new test in the corresponding file, or should I replace the whole file?
Romain Bellessort
Comment 7 2017-12-12 01:56:30 PST
Romain Bellessort
Comment 8 2017-12-12 01:57:57 PST
This patch imports only the corresponding test from WPT. If this is not the right approach please tell me.
Xabier Rodríguez Calvar
Comment 9 2017-12-12 02:13:17 PST
Comment on attachment 329097 [details] Patch Lgtm, but let's wait for Youenn's opinion before landing.
EWS Watchlist
Comment 10 2017-12-12 02:52:16 PST
Comment on attachment 329097 [details] Patch Attachment 329097 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/5628416 New failing tests: imported/w3c/web-platform-tests/streams/readable-byte-streams/general.dedicatedworker.html
EWS Watchlist
Comment 11 2017-12-12 02:52:17 PST
Created attachment 329099 [details] Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 12 2017-12-12 03:05:04 PST
Comment on attachment 329097 [details] Patch Attachment 329097 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/5628433 New failing tests: imported/w3c/web-platform-tests/streams/readable-byte-streams/general.serviceworker.https.html imported/w3c/web-platform-tests/streams/readable-byte-streams/general.dedicatedworker.html
EWS Watchlist
Comment 13 2017-12-12 03:05:06 PST
Created attachment 329100 [details] Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 14 2017-12-12 03:18:04 PST
Comment on attachment 329097 [details] Patch Attachment 329097 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/5628431 New failing tests: imported/w3c/web-platform-tests/streams/readable-byte-streams/general.dedicatedworker.html
EWS Watchlist
Comment 15 2017-12-12 03:18:05 PST
Created attachment 329102 [details] Archive of layout-test-results from ews113 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 16 2017-12-12 03:20:12 PST
Comment on attachment 329097 [details] Patch Attachment 329097 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/5628445 New failing tests: imported/w3c/web-platform-tests/streams/readable-byte-streams/general.dedicatedworker.html
EWS Watchlist
Comment 17 2017-12-12 03:20:13 PST
Created attachment 329103 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Romain Bellessort
Comment 18 2017-12-12 06:04:12 PST
Romain Bellessort
Comment 19 2017-12-12 07:08:11 PST
I had forgotten to update some expectations. The new patch fixes that.
youenn fablet
Comment 20 2017-12-12 08:16:52 PST
Comment on attachment 329109 [details] Patch LGTM too
WebKit Commit Bot
Comment 21 2017-12-12 08:51:58 PST
Comment on attachment 329109 [details] Patch Clearing flags on attachment: 329109 Committed r225784: <https://trac.webkit.org/changeset/225784>
WebKit Commit Bot
Comment 22 2017-12-12 08:52:00 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 23 2017-12-12 08:52:38 PST
Note You need to log in before you can comment on or make changes to this bug.