Debian Codegraph @

testing/web-platform/tests/streams/transferable/transform-stream-members.any.js

raw
1 // META: global=window,dedicatedworker,shadowrealm
2
3 const combinations = [
4 (t => [t, t.readable])(new TransformStream()),
5 (t => [t.readable, t])(new TransformStream()),
6 (t => [t, t.writable])(new TransformStream()),
7 (t => [t.writable, t])(new TransformStream()),
8 ];
9
10 for (const combination of combinations) {
11 test(() => {
12 assert_throws_dom(
13 "DataCloneError",
14 () => structuredClone(combination, { transfer: combination }),
15 "structuredClone should throw"
16 );
17 }, `Transferring ${combination} should fail`);
18 }