Update web-platform-tests to revision 36634cbcf3253dfe8d220990a27ad4eeebf8ec2f

This commit is contained in:
WPT Sync Bot 2018-09-27 21:57:09 -04:00
parent 0964d055cd
commit 7295abcc2a
245 changed files with 5966 additions and 1901 deletions

View file

@ -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");

View file

@ -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");

View file

@ -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");