Bug 1770047 [wpt PR 34117] - [Clipboard API] Clipboard Web Custom Formats implementat...
[gecko.git] / testing / web-platform / tests / encoding / sharedarraybuffer.https.html
blob2496edacb89ee8854e2996c3a24b18b33de4fd12
1 <!DOCTYPE html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <script>
6 test(() => {
7 const decoder = new TextDecoder('utf-8');
8 const buffer = new SharedArrayBuffer(4);
9 assert_throws_js(TypeError, () => {
10 decoder.decode(new Uint8Array(buffer));
11 }, 'constructing TextDecoder with SharedArrayBuffer view should throw');
12 }, 'decoding SharedArrayBuffer');
14 </script>