Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /streams/piping/general-addition.any.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.any.shadowrealm-in-dedicatedworker.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.any.shadowrealm-in-shadowrealm.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.any.shadowrealm-in-sharedworker.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.any.shadowrealm-in-window.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.any.worker.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.https.any.shadowrealm-in-audioworklet.html - WPT Dashboard Interop Dashboard
- /streams/piping/general-addition.https.any.shadowrealm-in-serviceworker.html - WPT Dashboard Interop Dashboard
// META: global=window,worker,shadowrealm
'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");