mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +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
|
@ -119,3 +119,9 @@ for (const type of ["i32", "f32", "f64"]) {
|
|||
}, `Explicit value ${name} for type ${type}`);
|
||||
}
|
||||
}
|
||||
|
||||
test(() => {
|
||||
const argument = { "value": "i32" };
|
||||
const global = new WebAssembly.Global(argument, 0, {});
|
||||
assert_Global(global, 0);
|
||||
}, "Stray argument");
|
||||
|
|
|
@ -92,3 +92,20 @@ test(() => {
|
|||
|
||||
assert_throws(new TypeError(), () => setter.call(global));
|
||||
}, "Calling setter without argument");
|
||||
|
||||
test(() => {
|
||||
const argument = { "value": "i32", "mutable": true };
|
||||
const global = new WebAssembly.Global(argument);
|
||||
const desc = Object.getOwnPropertyDescriptor(WebAssembly.Global.prototype, "value");
|
||||
assert_equals(typeof desc, "object");
|
||||
|
||||
const getter = desc.get;
|
||||
assert_equals(typeof getter, "function");
|
||||
|
||||
const setter = desc.set;
|
||||
assert_equals(typeof setter, "function");
|
||||
|
||||
assert_equals(getter.call(global, {}), 0);
|
||||
assert_equals(setter.call(global, 1, {}), undefined);
|
||||
assert_equals(global.value, 1);
|
||||
}, "Stray argument");
|
|
@ -20,3 +20,9 @@ test(() => {
|
|||
assert_throws(new TypeError(), () => fn.call(thisValue), `this=${format_value(thisValue)}`);
|
||||
}
|
||||
}, "Branding");
|
||||
|
||||
test(() => {
|
||||
const argument = { "value": "i32" };
|
||||
const global = new WebAssembly.Global(argument, 0);
|
||||
assert_equals(global.valueOf({}), 0);
|
||||
}, "Stray argument");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue