Revision 6571e31adb61b5c42f8dcf612e467958c9561650 authored by Ben Kelly on 11 April 2018, 09:35:46 UTC, committed by moz-wptsync-bot on 11 April 2018, 14:50:18 UTC
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1451124 gecko-commit: aed7d4d9be32f8806138d2a23f4b8b0332498085 gecko-integration-branch: central gecko-reviewers: asuth
1 parent 6e61ed2
wasm_local_iframe_test.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/load_wasm.js"></script>
<script>
function runTests(iframe) {
iframe = iframe.contentWindow;
promise_test(async function() {
var mod = await createWasmModule();
assert_true(mod instanceof WebAssembly.Module);
var ans = await new Promise((resolve, reject) => {
iframe.postMessage(mod, '*');
window.addEventListener("message", (reply) => resolve(reply.data), false);
});
assert_equals(ans, 43);
}, "send wasm module to iframe");
}
</script>
<iframe src="resources/frame.html" onload="runTests(this)"></iframe>
Computing file changes ...