Skip to content

Commit 6b84451

Browse files
anonrigruyadorno
authored andcommitted
test: update wasm/jsapi web platform tests
PR-URL: #44100 Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 537d52f commit 6b84451

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

test/fixtures/wpt/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Last update:
2727
- streams: https://github.com/web-platform-tests/wpt/tree/8f60d94439/streams
2828
- url: https://github.com/web-platform-tests/wpt/tree/0e5b126cd0/url
2929
- user-timing: https://github.com/web-platform-tests/wpt/tree/df24fb604e/user-timing
30-
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/1dd414c796/wasm/jsapi
30+
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/d8dbe6990b/wasm/jsapi
3131
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi
3232
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/cdd0f03df4/WebCryptoAPI
3333
- webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/a370aad338/webidl/ecmascript-binding/es-exceptions

test/fixtures/wpt/versions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"path": "user-timing"
6969
},
7070
"wasm/jsapi": {
71-
"commit": "1dd414c79616489ea021c800eb0375a709e8114e",
71+
"commit": "d8dbe6990bed03ec03beee25069a9347d4c3d6d5",
7272
"path": "wasm/jsapi"
7373
},
7474
"wasm/webapi": {

test/fixtures/wpt/wasm/jsapi/global/constructor.any.js

+5
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ test(() => {
8787
}
8888
}, "Invalid type argument");
8989

90+
test(() => {
91+
const argument = { "value": "v128" };
92+
assert_throws_js(TypeError, () => new WebAssembly.Global(argument));
93+
}, "Construct v128 global");
94+
9095
test(() => {
9196
const argument = { "value": "i64" };
9297
const global = new WebAssembly.Global(argument);

test/fixtures/wpt/wasm/jsapi/global/type.tentative.any.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ test(() => {
5050
}, "externref, immutable")
5151

5252
test(() => {
53-
assert_type({"value": "anyfunc", "mutable": true})
54-
}, "anyfunc, mutable")
53+
assert_type({"value": "funcref", "mutable": true})
54+
}, "funcref, mutable")
5555

5656
test(() => {
57-
assert_type({"value": "anyfunc", "mutable": false})
58-
}, "anyfunc, immutable")
57+
assert_type({"value": "funcref", "mutable": false})
58+
}, "funcref, immutable")
5959

6060
test(() => {
6161
const myglobal = new WebAssembly.Global({"value": "i32", "mutable": true});

test/fixtures/wpt/wasm/jsapi/table/type.tentative.any.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ function assert_type(argument) {
1010
}
1111

1212
test(() => {
13-
assert_type({ "minimum": 0, "element": "anyfunc"});
13+
assert_type({ "minimum": 0, "element": "funcref"});
1414
}, "Zero initial, no maximum");
1515

1616
test(() => {
17-
assert_type({ "minimum": 5, "element": "anyfunc" });
17+
assert_type({ "minimum": 5, "element": "funcref" });
1818
}, "Non-zero initial, no maximum");
1919

2020
test(() => {
21-
assert_type({ "minimum": 0, "maximum": 0, "element": "anyfunc" });
21+
assert_type({ "minimum": 0, "maximum": 0, "element": "funcref" });
2222
}, "Zero maximum");
2323

2424
test(() => {
25-
assert_type({ "minimum": 0, "maximum": 5, "element": "anyfunc" });
25+
assert_type({ "minimum": 0, "maximum": 5, "element": "funcref" });
2626
}, "Non-zero maximum");

0 commit comments

Comments
 (0)