forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1804575 [wpt PR 37393] - [rab/gsab] Add WPT tests for resizable A…
…rrayBuffer, a=testonly Automatic update from web-platform-tests [rab/gsab] Add WPT tests for resizable ArrayBuffer Bug: v8:11111 Change-Id: I531f10cae15dd09e7934ad698acf9dcae225ca4c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4082152 Reviewed-by: Domenic Denicola <[email protected]> Commit-Queue: Shu-yu Guo <[email protected]> Reviewed-by: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1086557} -- wpt-commits: 5656a2f4653b5894c500b724778009ca9a26e48c wpt-pr: 37393
- Loading branch information
1 parent
679f28f
commit c82b487
Showing
9 changed files
with
193 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...-platform/tests/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...rm/tests/html/infrastructure/safe-passing-of-structured-data/window-postmessage.window.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
testing/web-platform/tests/html/webappapis/structured-clone/structured-clone.any.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
testing/web-platform/tests/webidl/ecmascript-binding/allow-resizable.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE html> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/common/sab.js"></script> | ||
<script type="module"> | ||
test(t => { | ||
// Fixed-length ABs should not throw | ||
const ab = new ArrayBuffer(16); | ||
new Response(new Uint8Array(ab)); | ||
|
||
const rab = new ArrayBuffer(16, { maxByteLength: 1024 }); | ||
// Response doesn't have [AllowResizable] or [AllowShared] | ||
assert_throws_js(TypeError, () => { | ||
new Response(new Uint8Array(rab)); | ||
}); | ||
}, "APIs without [AllowResizable] throw when passed resizable ArrayBuffers"); | ||
|
||
test(t => { | ||
const enc = new TextEncoder(); | ||
|
||
// Fixed-length SABs should not throw | ||
const sab = createBuffer('SharedArrayBuffer', 16, { maxByteLength: 1024 }); | ||
enc.encodeInto("foobar", new Uint8Array(sab)); | ||
|
||
const gsab = createBuffer('SharedArrayBuffer', 16, { maxByteLength: 1024 }); | ||
// TextEncoder.encodeInto doesn't have [AllowResizable] but has [AllowShared] | ||
assert_throws_js(TypeError, () => { | ||
enc.encodeInto("foobar", new Uint8Array(gsab)); | ||
}); | ||
}, "APIs with [AllowShared] but without [AllowResizable] throw when passed growable SharedArrayBuffers"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters