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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html

Issue 2749503002: [wasm] enable wasm structured cloning in specific cases (Closed)
Patch Set: async Created 3 years, 9 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/http/tests/wasm/wasm_local_iframe_test.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html b/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html
new file mode 100644
index 0000000000000000000000000000000000000000..66f78855afca8e3461a8021ac5c5d311838a30e7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="resources/load_wasm.js"></script>
+<iframe src="resources/frame.html" id="iframe"></iframe>
+<script>
+ promise_test(async function() {
+ var mod = await createWasmModule();
+ assert_true(mod instanceof WebAssembly.Module);
+ var ans = await new Promise((resolve, reject) => {
+ var iframe = document.getElementById("iframe").contentWindow;
+ iframe.postMessage(mod, '*');
+ iframe.onmessage = event => resolve(event.data);
+ });
+ assert_equals(ans, 43);
+ }, "send wasm module to iframe");
+</script>

Powered by Google App Engine
This is Rietveld 408576698