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

Unified Diff: third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js

Issue 2808743005: [wasm] Compile closer to how customers will. (Closed)
Patch Set: [wasm] Compile closer to how customers will. Created 3 years, 8 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
Index: third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js
diff --git a/third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js b/third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js
index 9d1b67850553fda2567c63b28c8b94e3aa3e36c1..f246109a016b14fc83215a00cb9f934e9447579f 100644
--- a/third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js
+++ b/third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js
@@ -93,3 +93,26 @@ function TestPromiseCompileAsyncInstantiateFromModule() {
},
assert_unreached);
}
+
+
+function TestCompileFromPromise() {
+ return Promise.resolve(createTestBuffers(limit).large)
+ .then(WebAssembly.compile)
+ .then(m => assert_true(m instanceof WebAssembly.Module))
+}
+
+function TestInstantiateFromPromise() {
+ return Promise.resolve(createTestBuffers(limit).large)
+ .then(WebAssembly.instantiate)
+ .then(pair => {
+ assert_true(pair.module instanceof WebAssembly.Module);
+ assert_true(pair.instance instanceof WebAssembly.Instance);
+ });
+}
+
+function TestInstantiateFromPromiseChain() {
+ return Promise.resolve(createTestBuffers(limit).large)
+ .then(WebAssembly.compile)
+ .then(WebAssembly.instantiate)
+ .then(i => assert_true(i instanceof WebAssembly.Instance))
+}

Powered by Google App Engine
This is Rietveld 408576698