Skip to content

Commit

Permalink
[js-api] Sync with WPT tests
Browse files Browse the repository at this point in the history
This reflects the WPT changes in
web-platform-tests/wpt@5623804
web-platform-tests/wpt@e0c0429
and web-platform-tests/wpt#42764

This also changes `worker` from `dedicatedworker` in
`legacy/exceptions/js-api/basic.tentative.any.js`, even though the
matching WPT test has not been updated to use it, because all other
tests seem to be using `dedicatedworker` now.
  • Loading branch information
aheejin committed Jun 11, 2024
1 parent 87ae341 commit 6b60540
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion test/js-api/exception/constructor.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,dedicatedworker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/assertions.js

test(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/js-api/exception/getArg.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,dedicatedworker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/memory/assertions.js

test(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/js-api/exception/is.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,dedicatedworker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/memory/assertions.js

test(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/js-api/exception/toString.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,dedicatedworker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm

test(() => {
const argument = { parameters: [] };
Expand Down
2 changes: 1 addition & 1 deletion test/js-api/tag/constructor.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,dedicatedworker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/assertions.js

test(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/js-api/tag/toString.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,dedicatedworker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm

test(() => {
const argument = { parameters: [] };
Expand Down
2 changes: 1 addition & 1 deletion test/js-api/tag/type.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,dedicatedworker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/assertions.js

function assert_type(argument) {
Expand Down
11 changes: 5 additions & 6 deletions test/legacy/exceptions/js-api/basic.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,worker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/wasm-module-builder.js

function assert_throws_wasm(fn, message) {
Expand All @@ -11,8 +11,7 @@ function assert_throws_wasm(fn, message) {
}

promise_test(async () => {
const kWasmAnyRef = 0x6f;
const kSig_v_r = makeSig([kWasmAnyRef], []);
const kSig_v_r = makeSig([kWasmExternRef], []);
const builder = new WasmModuleBuilder();
const tagIndex = builder.addTag(kSig_v_r);
builder.addFunction("throw_param", kSig_v_r)
Expand Down Expand Up @@ -48,7 +47,7 @@ promise_test(async () => {
const tagIndex = builder.addTag(kSig_v_a);
builder.addFunction("throw_null", kSig_v_v)
.addBody([
kExprRefNull, kWasmAnyFunc,
kExprRefNull, kAnyFuncCode,
kExprThrow, tagIndex,
])
.exportFunc();
Expand Down Expand Up @@ -82,7 +81,7 @@ promise_test(async () => {
kExprCatch, tagIndex,
kExprReturn,
kExprEnd,
kExprRefNull, kWasmAnyRef,
kExprRefNull, kExternRefCode,
])
.exportFunc();

Expand All @@ -106,7 +105,7 @@ promise_test(async () => {
kExprCatchAll,
kExprRethrow, 0x00,
kExprEnd,
kExprRefNull, kWasmAnyRef,
kExprRefNull, kExternRefCode,
])
.exportFunc();

Expand Down
2 changes: 1 addition & 1 deletion test/legacy/exceptions/js-api/identity.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,dedicatedworker,jsshell
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/assertions.js
// META: script=/wasm/jsapi/wasm-module-builder.js

Expand Down

0 comments on commit 6b60540

Please sign in to comment.