Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1619)

Unified Diff: test/mjsunit/wasm/js-api.js

Issue 2620263003: Implement Instance instances correctly; fix a few error cases (Closed)
Patch Set: Export flag Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/common/wasm/wasm-module-runner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/js-api.js
diff --git a/test/mjsunit/wasm/js-api.js b/test/mjsunit/wasm/js-api.js
index fe299307f921c84f88aa4e4edb3118e039ff2e6e..1e91cfa5aeb912f77c88a7ed2b60ea8cce7736e4 100644
--- a/test/mjsunit/wasm/js-api.js
+++ b/test/mjsunit/wasm/js-api.js
@@ -134,8 +134,8 @@ assertErrorMessage(() => new Module(), TypeError, /requires more than 0 argument
assertErrorMessage(() => new Module(undefined), TypeError, "first argument must be an ArrayBuffer or typed array object");
assertErrorMessage(() => new Module(1), TypeError, "first argument must be an ArrayBuffer or typed array object");
assertErrorMessage(() => new Module({}), TypeError, "first argument must be an ArrayBuffer or typed array object");
-//TODO assertErrorMessage(() => new Module(new Uint8Array()), CompileError, /failed to match magic number/);
-//TODO assertErrorMessage(() => new Module(new ArrayBuffer()), CompileError, /failed to match magic number/);
+assertErrorMessage(() => new Module(new Uint8Array()), CompileError, /failed to match magic number/);
+assertErrorMessage(() => new Module(new ArrayBuffer()), CompileError, /failed to match magic number/);
assertEq(new Module(emptyModuleBinary) instanceof Module, true);
assertEq(new Module(emptyModuleBinary.buffer) instanceof Module, true);
@@ -259,9 +259,9 @@ assertEq(Instance.name, "Instance");
assertErrorMessage(() => Instance(), TypeError, /constructor without new is forbidden/);
assertErrorMessage(() => new Instance(1), TypeError, "first argument must be a WebAssembly.Module");
assertErrorMessage(() => new Instance({}), TypeError, "first argument must be a WebAssembly.Module");
-//TODO assertErrorMessage(() => new Instance(emptyModule, null), TypeError, "second argument must be an object");
-//TODO assertEq(new Instance(emptyModule) instanceof Instance, true);
-//TODO assertEq(new Instance(emptyModule, {}) instanceof Instance, true);
+assertErrorMessage(() => new Instance(emptyModule, null), TypeError, "second argument must be an object");
+assertEq(new Instance(emptyModule) instanceof Instance, true);
+assertEq(new Instance(emptyModule, {}) instanceof Instance, true);
// 'WebAssembly.Instance.prototype' data property
let instanceProtoDesc = Object.getOwnPropertyDescriptor(Instance, 'prototype');
« no previous file with comments | « test/common/wasm/wasm-module-runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698