From 271c80f56fd420275cf1ddabc32070f89c8c6894 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 11 Feb 2022 10:33:29 +0100 Subject: [PATCH] Sync js-api tests from wpt. --- test/js-api/constructor/toStringTag.any.js | 2 +- test/js-api/global/constructor.any.js | 5 ----- test/js-api/interface.any.js | 2 +- test/js-api/table/constructor.any.js | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/test/js-api/constructor/toStringTag.any.js b/test/js-api/constructor/toStringTag.any.js index 9c0d346bc7..c6d2cdaf66 100644 --- a/test/js-api/constructor/toStringTag.any.js +++ b/test/js-api/constructor/toStringTag.any.js @@ -1,7 +1,7 @@ // META: global=window,dedicatedworker,jsshell "use strict"; -// https://heycam.github.io/webidl/#es-namespaces +// https://webidl.spec.whatwg.org/#es-namespaces // https://webassembly.github.io/spec/js-api/#namespacedef-webassembly test(() => { diff --git a/test/js-api/global/constructor.any.js b/test/js-api/global/constructor.any.js index 7c2c02c790..f536f5d7b5 100644 --- a/test/js-api/global/constructor.any.js +++ b/test/js-api/global/constructor.any.js @@ -164,8 +164,3 @@ test(() => { const global = new WebAssembly.Global(argument, 0, {}); assert_Global(global, 0); }, "Stray argument"); - -test(() => { - const argument = { "value": "v128" }; - assert_throws_js(TypeError, () =>new WebAssembly.Global(argument)); -}, "Construct v128 global"); diff --git a/test/js-api/interface.any.js b/test/js-api/interface.any.js index 4551e6e6e3..19d29ead0a 100644 --- a/test/js-api/interface.any.js +++ b/test/js-api/interface.any.js @@ -143,7 +143,7 @@ test_attributes(WebAssembly.Memory.prototype, "WebAssembly.Memory", [ test_operations(WebAssembly.Table.prototype, "WebAssembly.Table", [ ["grow", 1], ["get", 1], - ["set", 2], + ["set", 1], ]); test_attributes(WebAssembly.Table.prototype, "WebAssembly.Table", [ diff --git a/test/js-api/table/constructor.any.js b/test/js-api/table/constructor.any.js index cf501fbc24..6d38d04e4f 100644 --- a/test/js-api/table/constructor.any.js +++ b/test/js-api/table/constructor.any.js @@ -89,7 +89,7 @@ test(() => { test(() => { const argument = { "element": "anyfunc", "initial": 0 }; - const table = new WebAssembly.Table(argument, {}); + const table = new WebAssembly.Table(argument, null, {}); assert_Table(table, { "length": 0 }); }, "Stray argument");