Debian Codegraph @

testing/web-platform/tests/streams/piping/general-addition.any.js

raw
1 // META: global=window,worker,shadowrealm
2 'use strict';
3
4 promise_test(async t => {
5 /** @type {ReadableStreamDefaultController} */
6 var con;
7 let synchronous = false;
8 new ReadableStream({ start(c) { con = c }}, { highWaterMark: 0 }).pipeTo(
9 new WritableStream({ write() { synchronous = true; } })
10 )
11 // wait until start algorithm finishes
12 await Promise.resolve();
13 con.enqueue();
14 assert_false(synchronous, 'write algorithm must not run synchronously');
15 }, "enqueue() must not synchronously call write algorithm");