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

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

Issue 2627763002: [wasm] JS APIs & memory (Closed)
Patch Set: 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/mjsunit/wasm/instantiate-module-basic.js ('k') | test/mjsunit/wasm/module-memory.js » ('j') | 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 259754018b828ed00d81cd73df1e2188510eed9d..98a5405f0f43d26960d197e9b29db65c86441953 100644
--- a/test/mjsunit/wasm/js-api.js
+++ b/test/mjsunit/wasm/js-api.js
@@ -48,6 +48,13 @@ let moduleBinaryImporting2Memories = (() => {
return new Int8Array(builder.toBuffer());
})();
+let moduleBinaryWithMemSectionAndMemImport = (() => {
+ var builder = new WasmModuleBuilder();
+ builder.addMemory(1, 1, false);
+ builder.addImportedMemory("", "memory1");
+ return new Int8Array(builder.toBuffer());
+})();
+
// 'WebAssembly' data property on global object
let wasmDesc = Object.getOwnPropertyDescriptor(this, 'WebAssembly');
assertEq(typeof wasmDesc.value, "object");
@@ -491,6 +498,7 @@ assertErrorMessage(() => WebAssembly.validate("hi"), TypeError);
assertEq(WebAssembly.validate(emptyModuleBinary), true);
// TODO: other ways for validate to return false.
assertEq(WebAssembly.validate(moduleBinaryImporting2Memories), false);
+assertEq(WebAssembly.validate(moduleBinaryWithMemSectionAndMemImport), false);
// 'WebAssembly.compile' data property
let compileDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'compile');
« no previous file with comments | « test/mjsunit/wasm/instantiate-module-basic.js ('k') | test/mjsunit/wasm/module-memory.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698