-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stream: implement ReadableStream.from
Fixes: #48389 PR-URL: #48395 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
- Loading branch information
1 parent
8f7c4e9
commit b361ad7
Showing
14 changed files
with
1,036 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// META: global=window,worker | ||
'use strict'; | ||
|
||
promise_test(async t => { | ||
/** @type {ReadableStreamDefaultController} */ | ||
var con; | ||
let synchronous = false; | ||
new ReadableStream({ start(c) { con = c }}, { highWaterMark: 0 }).pipeTo( | ||
new WritableStream({ write() { synchronous = true; } }) | ||
) | ||
// wait until start algorithm finishes | ||
await Promise.resolve(); | ||
con.enqueue(); | ||
assert_false(synchronous, 'write algorithm must not run synchronously'); | ||
}, "enqueue() must not synchronously call write algorithm"); |
Oops, something went wrong.