Bug 1706987 [wpt PR 28643] - Fix sharedarraybuffer.html web_tests, a=testonly

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
This commit is contained in:
arthursonzogni authored and moz-wptsync-bot committed 2021-04-24 15:47:58 +00:00
1 parent 94d1c94c95
commit 5b0c00cd63
2 files changed
+16

No files matched your search

@@ -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>