ReadableStream @@asyncIterator#15097
Merged
ricea merged 22 commits intoweb-platform-tests:masterfrom Feb 6, 2019
Merged
Conversation
651f1f3 to
3468631
Compare
ricea
approved these changes
Jan 30, 2019
Contributor
ricea
left a comment
There was a problem hiding this comment.
lgtm
We should land this at the same time as the standard changes.
Contributor
Author
|
I still want to add two more tests that were originally suggested:
I'll look into adding them. |
Contributor
Author
|
Last few tests added. Now it's just a matter of fixing the reference implementation to pass them... EDIT: Reference implementation is passing again. |
Contributor
|
Still lgtm with latest changes. |
Contributor
|
Is this behind a flag at Chromium? |
Contributor
|
3 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add tests for async-iterating a
ReadableStream. See whatwg/streams#980 for the accompanying spec change.This PR continues from @devsnek's work in #13362.
The tests are based on Domenic's comment in whatwg/streams#954. So far, the following tests have been implemented:
c.enqueue()instart) that enqueues all at oncec.enqueue()"just in time" (i.e. inside the loop body)c.enqueue()inpull) using recordingReadableStream to verify the correct underlying source method calls@@asyncIterator()method is===togetIterator()methodreturn()causes a cancelthrowing inside the loop body causes a cancelbreaking inside the loop body causes a cancelreturning inside the loop body causes a cancelpreventCancel: trueand the pass conditions reversed.closedpromise after exhausting the async iterator via for-await-of.closedpromise afterreturn()ing from the async iterator (either manually or viabreak; take your pick)