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

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

Issue 2822193003: [wasm] Enable local iframe test. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/wasm/resources/frame.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script> 2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 <script src="resources/load_wasm.js"></script> 4 <script src="resources/load_wasm.js"></script>
5 <iframe src="resources/frame.html" id="iframe"></iframe> 5 <iframe src="resources/frame.html" id="iframe"></iframe>
6 <script> 6 <script>
7 promise_test(async function() { 7 promise_test(async function() {
8 var mod = await createWasmModule(); 8 var mod = await createWasmModule();
9 assert_true(mod instanceof WebAssembly.Module); 9 assert_true(mod instanceof WebAssembly.Module);
10 var ans = await new Promise((resolve, reject) => { 10 var ans = await new Promise((resolve, reject) => {
11 var iframe = document.getElementById("iframe").contentWindow; 11 var iframe = document.getElementById("iframe").contentWindow;
12 iframe.postMessage(mod, '*'); 12 iframe.postMessage(mod, '*');
13 iframe.onmessage = event => resolve(event.data); 13 window.addEventListener("message", (reply) => resolve(reply.data), false);
14 }); 14 });
15 assert_equals(ans, 43); 15 assert_equals(ans, 43);
16 }, "send wasm module to iframe"); 16 }, "send wasm module to iframe");
17 </script> 17 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/wasm/resources/frame.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698