diff options
Diffstat (limited to 'testing/web-platform/tests/encoding/sharedarraybuffer.https.html')
-rw-r--r-- | testing/web-platform/tests/encoding/sharedarraybuffer.https.html | 14 |
1 files changed, 14 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> |