mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Update web-platform-tests to revision 36634cbcf3253dfe8d220990a27ad4eeebf8ec2f
This commit is contained in:
parent
0964d055cd
commit
7295abcc2a
245 changed files with 5966 additions and 1901 deletions
|
@ -96,6 +96,12 @@ test(() => {
|
|||
assert_Table(table, { "length": 5 });
|
||||
}, "Basic (non-zero)");
|
||||
|
||||
test(() => {
|
||||
const argument = { "element": "anyfunc", "initial": 0 };
|
||||
const table = new WebAssembly.Table(argument, {});
|
||||
assert_Table(table, { "length": 0 });
|
||||
}, "Stray argument");
|
||||
|
||||
test(() => {
|
||||
const proxy = new Proxy({}, {
|
||||
has(o, x) {
|
||||
|
|
|
@ -220,3 +220,11 @@ test(() => {
|
|||
assert_equals(called, 1);
|
||||
}, "Order of argument conversion");
|
||||
|
||||
test(() => {
|
||||
const {fn} = functions;
|
||||
const argument = { "element": "anyfunc", "initial": 1 };
|
||||
const table = new WebAssembly.Table(argument);
|
||||
|
||||
assert_equals(table.get(0, {}), null);
|
||||
assert_equals(table.set(0, fn, {}), undefined);
|
||||
}, "Stray argument");
|
||||
|
|
|
@ -84,3 +84,13 @@ for (const value of outOfRangeValues) {
|
|||
assert_throws(new TypeError(), () => table.grow(value));
|
||||
}, `Out-of-range argument: ${format_value(value)}`);
|
||||
}
|
||||
|
||||
test(() => {
|
||||
const argument = { "element": "anyfunc", "initial": 5 };
|
||||
const table = new WebAssembly.Table(argument);
|
||||
assert_equal_to_array(table, nulls(5), "before");
|
||||
|
||||
const result = table.grow(3, {});
|
||||
assert_equals(result, 5);
|
||||
assert_equal_to_array(table, nulls(8), "after");
|
||||
}, "Stray argument");
|
||||
|
|
|
@ -26,6 +26,20 @@ test(() => {
|
|||
}
|
||||
}, "Branding");
|
||||
|
||||
test(() => {
|
||||
const argument = { "element": "anyfunc", "initial": 2 };
|
||||
const table = new WebAssembly.Table(argument);
|
||||
assert_equals(table.length, 2, "Initial length");
|
||||
|
||||
const desc = Object.getOwnPropertyDescriptor(WebAssembly.Table.prototype, "length");
|
||||
assert_equals(typeof desc, "object");
|
||||
|
||||
const getter = desc.get;
|
||||
assert_equals(typeof getter, "function");
|
||||
|
||||
assert_equals(getter.call(table, {}), 2);
|
||||
}, "Stray argument");
|
||||
|
||||
test(() => {
|
||||
const argument = { "element": "anyfunc", "initial": 2 };
|
||||
const table = new WebAssembly.Table(argument);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue