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

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

Issue 2417773004: [wasm] Reduce usage of old Wasm.* API in JS tests. (Closed)
Patch Set: Created 4 years, 2 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/verify-module-basic-errors.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/wasm-object-api.js
diff --git a/test/mjsunit/wasm/wasm-object-api.js b/test/mjsunit/wasm/wasm-object-api.js
index b8663b3b29b043690e3b885d4ca307e7b16be71c..2fa57b033bf73cd83e2a65223570ea6e37e94840 100644
--- a/test/mjsunit/wasm/wasm-object-api.js
+++ b/test/mjsunit/wasm/wasm-object-api.js
@@ -4,12 +4,19 @@
// Flags: --expose-wasm
-assertFalse(undefined === Wasm);
-assertFalse(undefined == Wasm);
-assertEquals("function", typeof Wasm.verifyModule);
-assertEquals("function", typeof Wasm.verifyFunction);
-assertEquals("function", typeof Wasm.instantiateModule);
-assertFalse(undefined == Wasm.experimentalVersion);
+var oldApi = true;
+
+if (oldApi) {
+ assertFalse(undefined === Wasm);
+ assertFalse(undefined == Wasm);
+ assertEquals("function", typeof Wasm.verifyModule);
+ assertEquals("function", typeof Wasm.verifyFunction);
+ assertEquals("function", typeof Wasm.instantiateModule);
+ assertFalse(undefined == Wasm.experimentalVersion);
+} else {
+ assertTrue(undefined === Wasm);
+ assertTrue(undefined == Wasm);
+}
assertEquals('object', typeof WebAssembly);
assertEquals('function', typeof WebAssembly.Module);
« no previous file with comments | « test/mjsunit/wasm/verify-module-basic-errors.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698