Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This addresses a problem for the failing tests surrounding WASM Memory and table constructors. The type reflection feature added a minimum parameter which is enabled on nightly but not beta and relese. This fixes the expectations so they it's expected they fail in those situations. It also addresses a problem in a failing test which always passed due to a missing new keyword. Differential Revision: https://phabricator.services.mozilla.com/D91152 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1666481 gecko-commit: f9d65fd50034f350383b14c02ff12373352bd991 gecko-reviewers: lth
- Loading branch information
1 parent
f0d83d8
commit c9af305
Showing
3 changed files
with
8 additions
and
8 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
// META: global=jsshell | ||
// META: global=window,dedicatedworker,jsshell | ||
// META: script=/wasm/jsapi/assertions.js | ||
// META: script=/wasm/jsapi/table/assertions.js | ||
|
||
test(() => { | ||
const argument = { "element": "anyfunc", "initial": 0, "minimum": 0 }; | ||
assert_throws_js(TypeError, () => WebAssembly.Table(argument)); | ||
}, "Supplying both initial and minimum"); | ||
assert_throws_js(TypeError, () => new WebAssembly.Table(argument)); | ||
}, "Initializing with both initial and minimum"); | ||
|
||
test(() => { | ||
const argument = { "element": "anyfunc", "minimum": 0 }; | ||
const table = new WebAssembly.Table(argument); | ||
assert_Table(table, { "length": 0 }); | ||
}, "Basic (zero, minimum)"); | ||
}, "Zero minimum"); | ||
|
||
test(() => { | ||
const argument = { "element": "anyfunc", "minimum": 5 }; | ||
const table = new WebAssembly.Table(argument); | ||
assert_Table(table, { "length": 5 }); | ||
}, "Basic (non-zero, minimum)"); | ||
}, "Non-zero minimum"); |