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

Unified Diff: test/mjsunit/wasm/instantiate-module-basic.js

Issue 2591753002: [wasm] Implement correct 2-level namespace for imports. (Closed)
Patch Set: Fix debug tests Created 4 years 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/instance-memory-gc-stress.js ('k') | test/mjsunit/wasm/js-api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/instantiate-module-basic.js
diff --git a/test/mjsunit/wasm/instantiate-module-basic.js b/test/mjsunit/wasm/instantiate-module-basic.js
index d3a70dcda85d24a3a617bddffc8ae4222147a66f..c9c6e17f3555d0110aa0a85b23ff8adeed7b288a 100644
--- a/test/mjsunit/wasm/instantiate-module-basic.js
+++ b/test/mjsunit/wasm/instantiate-module-basic.js
@@ -120,8 +120,8 @@ assertFalse(WebAssembly.validate(bytes(88, 88, 88, 88, 88, 88, 88, 88)));
builder.addMemory(1,1, true);
var kSig_v_i = makeSig([kAstI32], []);
var signature = builder.addType(kSig_v_i);
- builder.addImport("some_value", kSig_i_v);
- builder.addImport("writer", signature);
+ builder.addImport("m", "some_value", kSig_i_v);
+ builder.addImport("m", "writer", signature);
builder.addFunction("main", kSig_i_i)
.addBody([
@@ -155,10 +155,12 @@ assertFalse(WebAssembly.validate(bytes(88, 88, 88, 88, 88, 88, 88, 88)));
var outval_1;
var outval_2;
- var i1 = new WebAssembly.Instance(module, {some_value: () => 1,
- writer: (x)=>outval_1 = x }, mem_1);
- var i2 = new WebAssembly.Instance(module, {some_value: () => 2,
- writer: (x)=>outval_2 = x }, mem_2);
+ var i1 = new WebAssembly.Instance(module, {m: {some_value: () => 1,
+ writer: (x)=>outval_1 = x }},
+ mem_1);
+ var i2 = new WebAssembly.Instance(module, {m: {some_value: () => 2,
+ writer: (x)=>outval_2 = x }},
+ mem_2);
assertEquals(43, i1.exports.main(0));
assertEquals(1002, i2.exports.main(0));
« no previous file with comments | « test/mjsunit/wasm/instance-memory-gc-stress.js ('k') | test/mjsunit/wasm/js-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698