forked from mirrors/gecko-dev
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 <arthursonzogni@chromium.org> Reviewed-by: Antonio Sartori <antoniosartori@chromium.org> Cr-Commit-Position: refs/heads/master@{#875204} -- wpt-commits: f0100ca251375fc5bf241d14ceaf6dbef74432e9 wpt-pr: 28643
14 lines
434 B
HTML
14 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>
|