mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-15 14:35:58 -10:00
Automatic update from web-platform-tests Fix sharedarraybuffer.html web_tests Move the test to WPT and use a crossOriginIsolated context to allow constructing SharedArrayBuffer. Bug: 1194557 Change-Id: I4661a6c1b54479779367f0cb273dcd4f5fe3cf34 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2845404 Commit-Queue: Arthur Sonzogni <[email protected]> Reviewed-by: Antonio Sartori <[email protected]> Cr-Commit-Position: refs/heads/master@{#875204} -- wpt-commits: f0100ca251375fc5bf241d14ceaf6dbef74432e9 wpt-pr: 28643
15 lines
434 B
HTML
15 lines
434 B
HTML
<!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>
|