diff --git a/encoding/api-invalid-label.any.js b/encoding/api-invalid-label.any.js index d88f4ae780d372..b5735c351f1faa 100644 --- a/encoding/api-invalid-label.any.js +++ b/encoding/api-invalid-label.any.js @@ -1,4 +1,5 @@ // META: title=Encoding API: invalid label +// META: global=window,dedicatedworker,shadowrealm // META: timeout=long // META: variant=?1-1000 // META: variant=?1001-2000 diff --git a/encoding/api-replacement-encodings.any.js b/encoding/api-replacement-encodings.any.js index 9031cf6638cad8..ff52db4e547413 100644 --- a/encoding/api-replacement-encodings.any.js +++ b/encoding/api-replacement-encodings.any.js @@ -1,4 +1,5 @@ // META: title=Encoding API: replacement encoding +// META: global=window,dedicatedworker,shadowrealm // META: script=resources/encodings.js encodings_table.forEach(function(section) { diff --git a/encoding/encodeInto.any.js b/encoding/encodeInto.any.js index 90f395b4d0c12e..a64730d12c8b69 100644 --- a/encoding/encodeInto.any.js +++ b/encoding/encodeInto.any.js @@ -1,4 +1,4 @@ -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=/common/sab.js [ diff --git a/encoding/resources/encodings.js b/encoding/resources/encodings.js index 80933bf9386cb6..0e1c9cdda76644 100644 --- a/encoding/resources/encodings.js +++ b/encoding/resources/encodings.js @@ -1,5 +1,5 @@ // Straight from https://encoding.spec.whatwg.org/encodings.json -const encodings_table = +globalThis.encodings_table = [ { "encodings": [ diff --git a/encoding/sharedarraybuffer.https.any.js b/encoding/sharedarraybuffer.https.any.js index b3305053b80351..7657a320949654 100644 --- a/encoding/sharedarraybuffer.https.any.js +++ b/encoding/sharedarraybuffer.https.any.js @@ -1,3 +1,5 @@ +// META: global=window,dedicatedworker,shadowrealm + test(() => { const decoder = new TextDecoder('utf-8'); const buffer = new SharedArrayBuffer(4); diff --git a/encoding/single-byte-textdecoder.any.js b/encoding/single-byte-textdecoder.any.js index 62ab0a7d7b4523..b19427b44415e0 100644 --- a/encoding/single-byte-textdecoder.any.js +++ b/encoding/single-byte-textdecoder.any.js @@ -1,3 +1,4 @@ +// META: global=window,dedicatedworker,shadowrealm // META: timeout=long // META: script=/encoding/resources/encodings.js diff --git a/encoding/streams/decode-ignore-bom.any.js b/encoding/streams/decode-ignore-bom.any.js index 92f89c80158c35..6f1c430084921f 100644 --- a/encoding/streams/decode-ignore-bom.any.js +++ b/encoding/streams/decode-ignore-bom.any.js @@ -1,4 +1,4 @@ -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=resources/readable-stream-from-array.js // META: script=resources/readable-stream-to-array.js diff --git a/encoding/streams/decode-incomplete-input.any.js b/encoding/streams/decode-incomplete-input.any.js index 3add74336df330..c2ceb9fa145c67 100644 --- a/encoding/streams/decode-incomplete-input.any.js +++ b/encoding/streams/decode-incomplete-input.any.js @@ -1,4 +1,4 @@ -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=resources/readable-stream-from-array.js // META: script=resources/readable-stream-to-array.js diff --git a/encoding/streams/decode-split-character.any.js b/encoding/streams/decode-split-character.any.js index d589694fce9f16..8fe96985c0544d 100644 --- a/encoding/streams/decode-split-character.any.js +++ b/encoding/streams/decode-split-character.any.js @@ -1,4 +1,4 @@ -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=resources/readable-stream-from-array.js // META: script=resources/readable-stream-to-array.js diff --git a/encoding/streams/decode-utf8.any.js b/encoding/streams/decode-utf8.any.js index 2a5de5bbb412a1..26943430331851 100644 --- a/encoding/streams/decode-utf8.any.js +++ b/encoding/streams/decode-utf8.any.js @@ -1,4 +1,4 @@ -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=resources/readable-stream-from-array.js // META: script=resources/readable-stream-to-array.js // META: script=/common/sab.js diff --git a/encoding/streams/encode-bad-chunks.any.js b/encoding/streams/encode-bad-chunks.any.js index 4a926a67d287c9..f2cf0ec546c6dd 100644 --- a/encoding/streams/encode-bad-chunks.any.js +++ b/encoding/streams/encode-bad-chunks.any.js @@ -1,4 +1,4 @@ -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=resources/readable-stream-from-array.js // META: script=resources/readable-stream-to-array.js diff --git a/encoding/streams/encode-utf8.any.js b/encoding/streams/encode-utf8.any.js index a5ba8f91eaf7f5..6bfef61c95acc6 100644 --- a/encoding/streams/encode-utf8.any.js +++ b/encoding/streams/encode-utf8.any.js @@ -1,4 +1,4 @@ -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=resources/readable-stream-from-array.js // META: script=resources/readable-stream-to-array.js diff --git a/encoding/streams/resources/readable-stream-from-array.js b/encoding/streams/resources/readable-stream-from-array.js index 5c12ba8c8bba60..20e093fcde790c 100644 --- a/encoding/streams/resources/readable-stream-from-array.js +++ b/encoding/streams/resources/readable-stream-from-array.js @@ -10,3 +10,4 @@ function readableStreamFromArray(array) { } }); } +globalThis.readableStreamFromArray = readableStreamFromArray; diff --git a/encoding/streams/resources/readable-stream-to-array.js b/encoding/streams/resources/readable-stream-to-array.js index fda03e22644922..64a584cdd80cb3 100644 --- a/encoding/streams/resources/readable-stream-to-array.js +++ b/encoding/streams/resources/readable-stream-to-array.js @@ -9,3 +9,4 @@ function readableStreamToArray(stream) { }); return stream.pipeTo(writable).then(() => array); } +globalThis.readableStreamToArray = readableStreamToArray; diff --git a/encoding/textdecoder-copy.any.js b/encoding/textdecoder-copy.any.js index 61de4142bf27a2..8bc829a4d71609 100644 --- a/encoding/textdecoder-copy.any.js +++ b/encoding/textdecoder-copy.any.js @@ -1,4 +1,4 @@ -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=/common/sab.js ["ArrayBuffer", "SharedArrayBuffer"].forEach(arrayBufferOrSharedArrayBuffer => { diff --git a/encoding/textdecoder-eof.any.js b/encoding/textdecoder-eof.any.js index e41e326aace244..5a1a40922eca3a 100644 --- a/encoding/textdecoder-eof.any.js +++ b/encoding/textdecoder-eof.any.js @@ -1,3 +1,5 @@ +// META: global=window,dedicatedworker,shadowrealm + test(() => { // Truncated sequences assert_equals(new TextDecoder().decode(new Uint8Array([0xF0])), "\uFFFD"); diff --git a/encoding/textdecoder-fatal-single-byte.any.js b/encoding/textdecoder-fatal-single-byte.any.js index c0012ddd27e415..36a6296fdab043 100644 --- a/encoding/textdecoder-fatal-single-byte.any.js +++ b/encoding/textdecoder-fatal-single-byte.any.js @@ -1,6 +1,6 @@ // META: timeout=long // META: title=Encoding API: Fatal flag for single byte encodings -// META: timeout=long +// META: global=window,dedicatedworker,shadowrealm // META: variant=?1-1000 // META: variant=?1001-2000 // META: variant=?2001-3000 diff --git a/encoding/textdecoder-labels.any.js b/encoding/textdecoder-labels.any.js index efc4ae2d2ea586..efd1ce587cf160 100644 --- a/encoding/textdecoder-labels.any.js +++ b/encoding/textdecoder-labels.any.js @@ -1,4 +1,5 @@ // META: title=Encoding API: Encoding labels +// META: global=window,dedicatedworker,shadowrealm // META: script=resources/encodings.js // META: timeout=long diff --git a/encoding/textdecoder-streaming.any.js b/encoding/textdecoder-streaming.any.js index e473a7056e24d3..322ca552bb1d22 100644 --- a/encoding/textdecoder-streaming.any.js +++ b/encoding/textdecoder-streaming.any.js @@ -1,5 +1,5 @@ // META: title=Encoding API: Streaming decode -// META: global=window,worker +// META: global=window,worker,shadowrealm // META: script=resources/encodings.js // META: script=/common/sab.js diff --git a/encoding/textencoder-constructor-non-utf.any.js b/encoding/textencoder-constructor-non-utf.any.js index c7136da4dcec99..6ac4553544b3a3 100644 --- a/encoding/textencoder-constructor-non-utf.any.js +++ b/encoding/textencoder-constructor-non-utf.any.js @@ -1,4 +1,5 @@ // META: title=Encoding API: Legacy encodings +// META: global=window,dedicatedworker,shadowrealm // META: script=resources/encodings.js encodings_table.forEach(function(section) {