-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 <matteo.collina@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
- Loading branch information
1 parent
1761bdf
commit 609b25f
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.