1
0
Fork 0
firefox/testing/web-platform/tests/infrastructure/channels/test_postMessage.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

23 lines
672 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>postMessage method</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/channel.sub.js"></script>
<script>
setup({single_test: true});
(async () => {
let remote = await new RemoteGlobal();
let url = `child_message.html?uuid=${remote.uuid}`;
win = window.open(url, "_blank", "noopener");
let [recvChannel, sendChannel] = channel();
await remote.postMessage(sendChannel);
await recvChannel.connect();
let message = await recvChannel.nextMessage();
assert_equals(message, "PASS");
done();
})();
</script>