diff options
Diffstat (limited to '')
-rw-r--r-- | testing/web-platform/tests/encoding/sharedarraybuffer.https.html | 14 | ||||
-rw-r--r-- | testing/web-platform/tests/encoding/sharedarraybuffer.https.html.headers | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/encoding/sharedarraybuffer.https.html b/testing/web-platform/tests/encoding/sharedarraybuffer.https.html new file mode 100644 index 0000000000..2496edacb8 --- /dev/null +++ b/testing/web-platform/tests/encoding/sharedarraybuffer.https.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + +test(() => { + const decoder = new TextDecoder('utf-8'); + const buffer = new SharedArrayBuffer(4); + assert_throws_js(TypeError, () => { + decoder.decode(new Uint8Array(buffer)); + }, 'constructing TextDecoder with SharedArrayBuffer view should throw'); +}, 'decoding SharedArrayBuffer'); + +</script> diff --git a/testing/web-platform/tests/encoding/sharedarraybuffer.https.html.headers b/testing/web-platform/tests/encoding/sharedarraybuffer.https.html.headers new file mode 100644 index 0000000000..4b06ac7cc6 --- /dev/null +++ b/testing/web-platform/tests/encoding/sharedarraybuffer.https.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy:same-origin +Cross-Origin-Embedder-Policy:require-corp |