Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /streams/piping/transform-streams.any.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.any.shadowrealm-in-dedicatedworker.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.any.shadowrealm-in-shadowrealm.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.any.shadowrealm-in-sharedworker.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.any.shadowrealm-in-window.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.any.worker.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.https.any.shadowrealm-in-audioworklet.html - WPT Dashboard Interop Dashboard
- /streams/piping/transform-streams.https.any.shadowrealm-in-serviceworker.html - WPT Dashboard Interop Dashboard
// META: global=window,worker,shadowrealm
'use strict';
promise_test(() => {
const rs = new ReadableStream({
start(c) {
c.enqueue('a');
c.enqueue('b');
c.enqueue('c');
c.close();
}
});
const ts = new TransformStream();
const ws = new WritableStream();
return rs.pipeThrough(ts).pipeTo(ws).then(() => {
const writer = ws.getWriter();
return writer.closed;
});
}, 'Piping through an identity transform stream should close the destination when the source closes');