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

Side by Side 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: fixed idb test 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <script src="resources/load_wasm.js"></script>
5 <iframe src="resources/frame.html" id="iframe"></iframe>
6 <script>
7 function TestSendToIFrame() {
jbroman 2017/03/27 18:50:52 As a matter of style, some of these console.log ca
Mircea Trofin 2017/03/27 20:52:32 The console were there for my debugging, thanks fo
jbroman 2017/03/28 15:27:25 async/await is the more recent (ES 2017) syntactic
8 var iframe = document.getElementById("iframe").contentWindow;
9 return createWasmModule()
10 .then(mod => {
11 console.log(mod instanceof WebAssembly.Module);
12 console.log("created module");
13 return new Promise((resolve, reject) => {
14 console.log("posted module");
15 iframe.postMessage(mod, "*");
16 iframe.onmessage = function(event) {
17 console.log("got reply");
18 resolve(event.data);
19 }
20 });
21 })
22 .then(ans => assert_equals(ans, 43))
23 .catch(assert_unreached);
24 }
25 promise_test(TestSendToIFrame, "send wasm module to worker");
jbroman 2017/03/27 18:50:52 to iframe, not worker, right?
Mircea Trofin 2017/03/27 20:52:33 Done.
26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698