Skip to content
Permalink
Browse files
[Streams API] Expose ReadableStream and relatives to Worker
https://bugs.webkit.org/show_bug.cgi?id=152066

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebasing tests as Worker tests are now running.

* web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt:
* web-platform-tests/streams-api/count-queuing-strategy-expected.txt:
* web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt:
* web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt:
* web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt:
* web-platform-tests/streams-api/readable-streams/cancel-expected.txt:
* web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt:
* web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt:
* web-platform-tests/streams-api/readable-streams/general-expected.txt:
* web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt:
* web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt:
* web-platform-tests/streams-api/readable-streams/tee-expected.txt:
* web-platform-tests/streams-api/readable-streams/templated-expected.txt:

Source/WebCore:

Covered by rebased tests.

* Modules/streams/ByteLengthQueuingStrategy.idl:
* Modules/streams/CountQueuingStrategy.idl:
* Modules/streams/ReadableStream.idl:
* Modules/streams/ReadableStreamController.idl:
* Modules/streams/ReadableStreamReader.idl:

LayoutTests:

Rebasing tests as ReadableStream is now available in workers.

* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt:


Canonical link: https://commits.webkit.org/171217@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf committed Jan 15, 2016
1 parent fd4f2fb commit 9920299d6626e5a01c5c76f5b1a84df3f8168893
Showing with 301 additions and 233 deletions.
  1. +12 −0 LayoutTests/ChangeLog
  2. +23 −0 LayoutTests/imported/w3c/ChangeLog
  3. +7 −7 LayoutTests/imported/w3c/web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt
  4. +7 −7 LayoutTests/imported/w3c/web-platform-tests/streams-api/count-queuing-strategy-expected.txt
  5. +7 −16 LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt
  6. +21 −27 .../imported/w3c/web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt
  7. +13 −13 LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt
  8. +10 −10 LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel-expected.txt
  9. +4 −4 ...c/web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt
  10. +4 −4 ...ests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt
  11. +33 −35 LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/general-expected.txt
  12. +5 −5 LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt
  13. +25 −25 .../imported/w3c/web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt
  14. +10 −10 LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/tee-expected.txt
  15. +70 −70 LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/templated-expected.txt
  16. +15 −0 LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
  17. +15 −0 LayoutTests/platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
  18. +15 −0 Source/WebCore/ChangeLog
  19. +1 −0 Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.idl
  20. +1 −0 Source/WebCore/Modules/streams/CountQueuingStrategy.idl
  21. +1 −0 Source/WebCore/Modules/streams/ReadableStream.idl
  22. +1 −0 Source/WebCore/Modules/streams/ReadableStreamController.idl
  23. +1 −0 Source/WebCore/Modules/streams/ReadableStreamReader.idl
@@ -1,3 +1,15 @@
2016-01-15 Youenn Fablet <youenn.fablet@crf.canon.fr>

[Streams API] Expose ReadableStream and relatives to Worker
https://bugs.webkit.org/show_bug.cgi?id=152066

Reviewed by Darin Adler.

Rebasing tests as ReadableStream is now available in workers.

* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt:

2016-01-15 Youenn Fablet <youenn.fablet@crf.canon.fr>

CORS: Fix the handling of redirected request containing Origin null.
@@ -1,3 +1,26 @@
2016-01-15 Youenn Fablet <youenn.fablet@crf.canon.fr>

[Streams API] Expose ReadableStream and relatives to Worker
https://bugs.webkit.org/show_bug.cgi?id=152066

Reviewed by Darin Adler.

Rebasing tests as Worker tests are now running.

* web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt:
* web-platform-tests/streams-api/count-queuing-strategy-expected.txt:
* web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt:
* web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt:
* web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt:
* web-platform-tests/streams-api/readable-streams/cancel-expected.txt:
* web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt:
* web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt:
* web-platform-tests/streams-api/readable-streams/general-expected.txt:
* web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt:
* web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt:
* web-platform-tests/streams-api/readable-streams/tee-expected.txt:
* web-platform-tests/streams-api/readable-streams/templated-expected.txt:

2016-01-14 Ryosuke Niwa <rniwa@webkit.org>

createElement should not lowercase non-ASCII characters
@@ -8,11 +8,11 @@ PASS ByteLengthQueuingStrategy instances have the correct properties
PASS ByteLengthQueuingStrategy's highWaterMark property can be set to anything
FAIL Load byte-length-queuing-strategy.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
FAIL Can construct a ByteLengthQueuingStrategy with a valid high water mark Can't find variable: ByteLengthQueuingStrategy
FAIL Can construct a ByteLengthQueuingStrategy with any value as its high water mark Can't find variable: ByteLengthQueuingStrategy
FAIL ByteLengthQueuingStrategy constructor behaves as expected with strange arguments assert_throws: construction fails with undefined function "() => new ByteLengthQueuingStrategy()" threw object "ReferenceError: Can't find variable: ByteLengthQueuingStr..." ("ReferenceError") expected object "[object Object]" ("TypeError")
FAIL ByteLengthQueuingStrategy size behaves as expected with strange arguments assert_throws: size fails with undefined function "() => ByteLengthQueuingStrategy.prototype.size()" threw object "ReferenceError: Can't find variable: ByteLengthQueuingStr..." ("ReferenceError") expected object "[object Object]" ("TypeError")
FAIL ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments Can't find variable: ByteLengthQueuingStrategy
FAIL ByteLengthQueuingStrategy instances have the correct properties Can't find variable: ByteLengthQueuingStrategy
FAIL ByteLengthQueuingStrategy's highWaterMark property can be set to anything Can't find variable: ByteLengthQueuingStrategy
PASS Can construct a ByteLengthQueuingStrategy with a valid high water mark
PASS Can construct a ByteLengthQueuingStrategy with any value as its high water mark
PASS ByteLengthQueuingStrategy constructor behaves as expected with strange arguments
PASS ByteLengthQueuingStrategy size behaves as expected with strange arguments
PASS ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments
PASS ByteLengthQueuingStrategy instances have the correct properties
PASS ByteLengthQueuingStrategy's highWaterMark property can be set to anything

@@ -8,11 +8,11 @@ PASS CountQueuingStrategy instances have the correct properties
PASS CountQueuingStrategy's highWaterMark property can be set to anything
FAIL Load count-queuing-strategy.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
FAIL Can construct a CountQueuingStrategy with a valid high water mark Can't find variable: CountQueuingStrategy
FAIL Can construct a CountQueuingStrategy with any value as its high water mark Can't find variable: CountQueuingStrategy
FAIL CountQueuingStrategy constructor behaves as expected with strange arguments assert_throws: construction fails with undefined function "() => new CountQueuingStrategy()" threw object "ReferenceError: Can't find variable: CountQueuingStrategy" ("ReferenceError") expected object "[object Object]" ("TypeError")
FAIL CountQueuingStrategy.prototype.size should work generically on its this and its arguments Can't find variable: CountQueuingStrategy
FAIL CountQueuingStrategy size behaves as expected with strange arguments Can't find variable: CountQueuingStrategy
FAIL CountQueuingStrategy instances have the correct properties Can't find variable: CountQueuingStrategy
FAIL CountQueuingStrategy's highWaterMark property can be set to anything Can't find variable: CountQueuingStrategy
PASS Can construct a CountQueuingStrategy with a valid high water mark
PASS Can construct a CountQueuingStrategy with any value as its high water mark
PASS CountQueuingStrategy constructor behaves as expected with strange arguments
PASS CountQueuingStrategy.prototype.size should work generically on its this and its arguments
PASS CountQueuingStrategy size behaves as expected with strange arguments
PASS CountQueuingStrategy instances have the correct properties
PASS CountQueuingStrategy's highWaterMark property can be set to anything

@@ -8,20 +8,11 @@ PASS Readable stream: invalid strategy.highWaterMark
PASS Readable stream: invalid strategy.size return value
FAIL Load bad-strategies.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
FAIL Readable stream: throwing strategy.size getter assert_throws: construction should re-throw the error function "() => {
new ReadableStream({}, {
get size() {
..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
FAIL Readable stream: strategy.size errors the stream and then throws Can't find variable: ReadableStream
FAIL Readable stream: strategy.size errors the stream and then returns Infinity Can't find variable: ReadableStream
FAIL Readable stream: throwing strategy.size method Can't find variable: ReadableStream
FAIL Readable stream: throwing strategy.highWaterMark getter assert_throws: construction should re-throw the error function "() => {
new ReadableStream({}, {
size() {
..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
FAIL Readable stream: invalid strategy.highWaterMark assert_throws: construction should throw a RangeError for -1 function "() => {
new ReadableStream({}, {
size() {
..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "RangeError" ("RangeError")
FAIL Readable stream: invalid strategy.size return value Can't find variable: ReadableStream
PASS Readable stream: throwing strategy.size getter
PASS Readable stream: strategy.size errors the stream and then throws
PASS Readable stream: strategy.size errors the stream and then returns Infinity
PASS Readable stream: throwing strategy.size method
PASS Readable stream: throwing strategy.highWaterMark getter
PASS Readable stream: invalid strategy.highWaterMark
PASS Readable stream: invalid strategy.size return value

@@ -22,31 +22,25 @@ PASS Underlying source: calling error and returning a rejected promise from star
PASS Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error
FAIL Load bad-underlying-sources.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
FAIL Underlying source start: throwing getter assert_throws: constructing the stream should re-throw the error function "() => {
new ReadableStream({
get start() {
..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
FAIL Underlying source start: throwing method assert_throws: constructing the stream should re-throw the error function "() => {
new ReadableStream({
start() {
..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
FAIL Underlying source: throwing pull getter (initial pull) Can't find variable: ReadableStream
FAIL Underlying source: throwing pull method (initial pull) Can't find variable: ReadableStream
FAIL Underlying source pull: throwing getter (second pull) Can't find variable: ReadableStream
FAIL Underlying source pull: throwing method (second pull) Can't find variable: ReadableStream
FAIL Underlying source cancel: throwing getter Can't find variable: ReadableStream
FAIL Underlying source cancel: throwing method Can't find variable: ReadableStream
FAIL Underlying source: calling enqueue on an empty canceled stream should not throw Can't find variable: ReadableStream
FAIL Underlying source: calling enqueue on a non-empty canceled stream should not throw Can't find variable: ReadableStream
FAIL Underlying source: calling enqueue on a closed stream should throw Can't find variable: ReadableStream
FAIL Underlying source: calling enqueue on an errored stream should throw Can't find variable: ReadableStream
FAIL Underlying source: calling close twice on an empty stream should throw the second time Can't find variable: ReadableStream
FAIL Underlying source: calling close twice on a non-empty stream should throw the second time Can't find variable: ReadableStream
FAIL Underlying source: calling close on an empty canceled stream should not throw Can't find variable: ReadableStream
FAIL Underlying source: calling close on a non-empty canceled stream should not throw Can't find variable: ReadableStream
FAIL Underlying source: calling close after error should throw Can't find variable: ReadableStream
FAIL Underlying source: calling error twice should throw the second time Can't find variable: ReadableStream
FAIL Underlying source: calling error after close should throw Can't find variable: ReadableStream
FAIL Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error Can't find variable: ReadableStream
FAIL Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error Can't find variable: ReadableStream
PASS Underlying source start: throwing getter
PASS Underlying source start: throwing method
PASS Underlying source: throwing pull getter (initial pull)
PASS Underlying source: throwing pull method (initial pull)
PASS Underlying source pull: throwing getter (second pull)
PASS Underlying source pull: throwing method (second pull)
PASS Underlying source cancel: throwing getter
PASS Underlying source cancel: throwing method
PASS Underlying source: calling enqueue on an empty canceled stream should not throw
PASS Underlying source: calling enqueue on a non-empty canceled stream should not throw
PASS Underlying source: calling enqueue on a closed stream should throw
PASS Underlying source: calling enqueue on an errored stream should throw
PASS Underlying source: calling close twice on an empty stream should throw the second time
PASS Underlying source: calling close twice on a non-empty stream should throw the second time
PASS Underlying source: calling close on an empty canceled stream should not throw
PASS Underlying source: calling close on a non-empty canceled stream should not throw
PASS Underlying source: calling close after error should throw
PASS Underlying source: calling error twice should throw the second time
PASS Underlying source: calling error after close should throw
PASS Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error
PASS Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error

@@ -16,19 +16,19 @@ PASS ReadableStreamController.prototype.enqueue enforces a brand check
PASS ReadableStreamController.prototype.error enforces a brand check
FAIL Load brand-checks.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
FAIL Can get the ReadableStreamReader constructor indirectly Can't find variable: ReadableStream
FAIL Can get the ReadableStreamController constructor indirectly Can't find variable: ReadableStream
FAIL ReadableStream.prototype.cancel enforces a brand check Can't find variable: ReadableStream
FAIL ReadableStream.prototype.getReader enforces a brand check Can't find variable: ReadableStream
FAIL ReadableStream.prototype.tee enforces a brand check Can't find variable: ReadableStream
PASS Can get the ReadableStreamReader constructor indirectly
PASS Can get the ReadableStreamController constructor indirectly
PASS ReadableStream.prototype.cancel enforces a brand check
PASS ReadableStream.prototype.getReader enforces a brand check
PASS ReadableStream.prototype.tee enforces a brand check
PASS ReadableStreamReader enforces a brand check on its argument
FAIL ReadableStreamReader.prototype.closed enforces a brand check undefined is not an object (evaluating 'ReadableStreamReader.prototype')
FAIL ReadableStreamReader.prototype.cancel enforces a brand check undefined is not an object (evaluating 'ReadableStreamReader.prototype')
FAIL ReadableStreamReader.prototype.read enforces a brand check undefined is not an object (evaluating 'ReadableStreamReader.prototype')
FAIL ReadableStreamReader.prototype.releaseLock enforces a brand check undefined is not an object (evaluating 'ReadableStreamReader.prototype')
PASS ReadableStreamReader.prototype.closed enforces a brand check
PASS ReadableStreamReader.prototype.cancel enforces a brand check
PASS ReadableStreamReader.prototype.read enforces a brand check
PASS ReadableStreamReader.prototype.releaseLock enforces a brand check
PASS ReadableStreamController enforces a brand check on its argument
FAIL ReadableStreamController can't be given a fully-constructed ReadableStream assert_throws: Constructing a ReadableStreamController should throw function "() => new ReadableStreamController(realReadableStream())" threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "TypeError" ("TypeError")
FAIL ReadableStreamController.prototype.close enforces a brand check undefined is not an object (evaluating 'ReadableStreamController.prototype')
FAIL ReadableStreamController.prototype.enqueue enforces a brand check undefined is not an object (evaluating 'ReadableStreamController.prototype')
FAIL ReadableStreamController.prototype.error enforces a brand check undefined is not an object (evaluating 'ReadableStreamController.prototype')
PASS ReadableStreamController can't be given a fully-constructed ReadableStream
PASS ReadableStreamController.prototype.close enforces a brand check
PASS ReadableStreamController.prototype.enqueue enforces a brand check
PASS ReadableStreamController.prototype.error enforces a brand check

@@ -11,14 +11,14 @@ PASS ReadableStream cancellation: if the underlying source's cancel method retur
PASS ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called
FAIL Load cancel.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
FAIL ReadableStream cancellation: integration test on an infinite stream derived from a random push source Can't find variable: ReadableStream
FAIL ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source Can't find variable: ReadableStream
FAIL ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel Can't find variable: ReadableStream
FAIL ReadableStream cancellation: should fulfill promise when cancel callback went fine Can't find variable: ReadableStream
FAIL ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel Can't find variable: ReadableStream
FAIL ReadableStream cancellation: should reject promise when cancel callback raises an exception Can't find variable: ReadableStream
FAIL ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1) Can't find variable: ReadableStream
FAIL ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2) Can't find variable: ReadableStream
FAIL ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does Can't find variable: ReadableStream
FAIL ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called Can't find variable: ReadableStream
PASS ReadableStream cancellation: integration test on an infinite stream derived from a random push source
PASS ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source
PASS ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel
PASS ReadableStream cancellation: should fulfill promise when cancel callback went fine
PASS ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel
PASS ReadableStream cancellation: should reject promise when cancel callback raises an exception
PASS ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1)
PASS ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2)
PASS ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does
PASS ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called

0 comments on commit 9920299

Please sign in to comment.