gecko-dev/testing/web-platform/tests/wasm/serialization/module/window-simple-success.html
Ben Smith 78198d2d0a Bug 1526433 [wpt PR 15148] - [WPT] [wasm] Move serialization tests to "module", a=testonly
Automatic update from web-platform-tests
[WPT] [wasm] Move serialization tests to "module"

The current WebAssembly serialization tests only cover serializing a
WebAssembly.Module object. With the threads proposal, we also allow
serializing WebAssembly.Memory objects.

Bug: chromium:926307
Change-Id: Ie31cf62ca6ab7fd42259f64909b9932a10e1d50e
Reviewed-on: https://chromium-review.googlesource.com/c/1444695
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628007}

--

wpt-commits: 870d6fd5067f533373ba161ca1b18e361207c8d0
wpt-pr: 15148


--HG--
rename : testing/web-platform/tests/wasm/serialization/broadcastchannel-success-and-failure.html => testing/web-platform/tests/wasm/serialization/module/broadcastchannel-success-and-failure.html
rename : testing/web-platform/tests/wasm/serialization/broadcastchannel-success.html => testing/web-platform/tests/wasm/serialization/module/broadcastchannel-success.html
rename : testing/web-platform/tests/wasm/serialization/identity-not-preserved.html => testing/web-platform/tests/wasm/serialization/module/identity-not-preserved.html
rename : testing/web-platform/tests/wasm/serialization/incrementer.wasm => testing/web-platform/tests/wasm/serialization/module/incrementer.wasm
rename : testing/web-platform/tests/wasm/serialization/nested-worker-success.any.js => testing/web-platform/tests/wasm/serialization/module/nested-worker-success.any.js
rename : testing/web-platform/tests/wasm/serialization/no-transferring.html => testing/web-platform/tests/wasm/serialization/module/no-transferring.html
rename : testing/web-platform/tests/wasm/serialization/resources/blank.html => testing/web-platform/tests/wasm/serialization/module/resources/blank.html
rename : testing/web-platform/tests/wasm/serialization/resources/broadcastchannel-iframe.html => testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-iframe.html
rename : testing/web-platform/tests/wasm/serialization/resources/broadcastchannel-sharedworker.js => testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-sharedworker.js
rename : testing/web-platform/tests/wasm/serialization/resources/broadcastchannel-worker.js => testing/web-platform/tests/wasm/serialization/module/resources/broadcastchannel-worker.js
rename : testing/web-platform/tests/wasm/serialization/resources/create-empty-wasm-module.js => testing/web-platform/tests/wasm/serialization/module/resources/create-empty-wasm-module.js
rename : testing/web-platform/tests/wasm/serialization/resources/echo-iframe.html => testing/web-platform/tests/wasm/serialization/module/resources/echo-iframe.html
rename : testing/web-platform/tests/wasm/serialization/resources/echo-worker.js => testing/web-platform/tests/wasm/serialization/module/resources/echo-worker.js
rename : testing/web-platform/tests/wasm/serialization/resources/incrementer-iframe-domain.sub.html => testing/web-platform/tests/wasm/serialization/module/resources/incrementer-iframe-domain.sub.html
rename : testing/web-platform/tests/wasm/serialization/resources/incrementer-iframe.html => testing/web-platform/tests/wasm/serialization/module/resources/incrementer-iframe.html
rename : testing/web-platform/tests/wasm/serialization/resources/incrementer-popup.html => testing/web-platform/tests/wasm/serialization/module/resources/incrementer-popup.html
rename : testing/web-platform/tests/wasm/serialization/resources/incrementer-worker-with-channel.js => testing/web-platform/tests/wasm/serialization/module/resources/incrementer-worker-with-channel.js
rename : testing/web-platform/tests/wasm/serialization/resources/incrementer-worker.js => testing/web-platform/tests/wasm/serialization/module/resources/incrementer-worker.js
rename : testing/web-platform/tests/wasm/serialization/resources/incrementer.wasm => testing/web-platform/tests/wasm/serialization/module/resources/incrementer.wasm
rename : testing/web-platform/tests/wasm/serialization/resources/nested-iframe-1.html => testing/web-platform/tests/wasm/serialization/module/resources/nested-iframe-1.html
rename : testing/web-platform/tests/wasm/serialization/resources/nested-iframe-2.html => testing/web-platform/tests/wasm/serialization/module/resources/nested-iframe-2.html
rename : testing/web-platform/tests/wasm/serialization/resources/nested-iframe-3.html => testing/web-platform/tests/wasm/serialization/module/resources/nested-iframe-3.html
rename : testing/web-platform/tests/wasm/serialization/resources/nested-iframe-4-incrementer.html => testing/web-platform/tests/wasm/serialization/module/resources/nested-iframe-4-incrementer.html
rename : testing/web-platform/tests/wasm/serialization/resources/serviceworker-failure.js => testing/web-platform/tests/wasm/serialization/module/resources/serviceworker-failure.js
rename : testing/web-platform/tests/wasm/serialization/resources/sharedworker-failure.js => testing/web-platform/tests/wasm/serialization/module/resources/sharedworker-failure.js
rename : testing/web-platform/tests/wasm/serialization/resources/test-incrementer.js => testing/web-platform/tests/wasm/serialization/module/resources/test-incrementer.js
rename : testing/web-platform/tests/wasm/serialization/serialization-via-history.html => testing/web-platform/tests/wasm/serialization/module/serialization-via-history.html
rename : testing/web-platform/tests/wasm/serialization/serialization-via-idb.any.js => testing/web-platform/tests/wasm/serialization/module/serialization-via-idb.any.js
rename : testing/web-platform/tests/wasm/serialization/serialization-via-notifications-api.any.js => testing/web-platform/tests/wasm/serialization/module/serialization-via-notifications-api.any.js
rename : testing/web-platform/tests/wasm/serialization/window-messagechannel-success.html => testing/web-platform/tests/wasm/serialization/module/window-messagechannel-success.html
rename : testing/web-platform/tests/wasm/serialization/window-serviceworker-failure.https.html => testing/web-platform/tests/wasm/serialization/module/window-serviceworker-failure.https.html
rename : testing/web-platform/tests/wasm/serialization/window-sharedworker-failure.html => testing/web-platform/tests/wasm/serialization/module/window-sharedworker-failure.html
rename : testing/web-platform/tests/wasm/serialization/window-simple-success.html => testing/web-platform/tests/wasm/serialization/module/window-simple-success.html
2019-02-14 11:38:35 +00:00

57 lines
2.1 KiB
HTML

<!DOCTYPE html>
<!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
<meta charset="utf-8">
<title>Structured cloning of WebAssembly.Module: simple success cases that don't need dedicated files</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./resources/test-incrementer.js"></script>
<div id="log"></div>
<script>
"use strict";
promise_test(t => {
const worker = new Worker("resources/incrementer-worker.js");
return testSharingViaIncrementerScript(t, worker, "window", worker, "worker", undefined);
}, "postMessaging to a dedicated worker allows them to instantiate");
promise_test(t => {
return new Promise(resolve => {
const iframe = document.createElement("iframe");
iframe.onload = t.step_func(() => {
resolve(testSharingViaIncrementerScript(t, window, "window", iframe.contentWindow, "iframe", "*"));
});
iframe.src = "resources/incrementer-iframe.html";
document.body.appendChild(iframe);
});
}, "postMessaging to a same-origin iframe allows them to instantiate");
promise_test(t => {
return new Promise(resolve => {
const iframe = document.createElement("iframe");
iframe.onload = t.step_func(() => {
const level1 = iframe.contentWindow;
const level2 = level1.frames[0];
const level3 = level2.frames[0];
const targetWindow = level3.frames[0];
resolve(testSharingViaIncrementerScript(t, window, "window", targetWindow, "nested iframe", "*"));
});
iframe.src = "resources/nested-iframe-1.html";
document.body.appendChild(iframe);
});
}, "postMessaging to a same-origin deeply-nested iframe allows them to instantiate");
promise_test(t => {
return new Promise(resolve => {
const w = window.open("resources/incrementer-popup.html");
w.onload = t.step_func(() => {
resolve(testSharingViaIncrementerScript(t, window, "window", w, "popup window", "*").then(() => {
w.close();
}));
});
});
}, "postMessaging to a same-origin opened window allows them to instantiate");
</script>