diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/fs/script-tests/FileSystemBaseHandle-postMessage-MessagePort-windows.js | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/fs/script-tests/FileSystemBaseHandle-postMessage-MessagePort-windows.js')
-rw-r--r-- | testing/web-platform/tests/fs/script-tests/FileSystemBaseHandle-postMessage-MessagePort-windows.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fs/script-tests/FileSystemBaseHandle-postMessage-MessagePort-windows.js b/testing/web-platform/tests/fs/script-tests/FileSystemBaseHandle-postMessage-MessagePort-windows.js new file mode 100644 index 0000000000..dceb250ebb --- /dev/null +++ b/testing/web-platform/tests/fs/script-tests/FileSystemBaseHandle-postMessage-MessagePort-windows.js @@ -0,0 +1,35 @@ +'use strict'; + +// This script depends on the following scripts: +// /fs/resources/messaging-helpers.js +// /fs/resources/messaging-blob-helpers.js +// /fs/resources/messaging-serialize-helpers.js +// /fs/resources/test-helpers.js + +directory_test( + async (t, root_dir) => { + const child_window = await open_window(t, kDocumentMessageTarget); + await do_message_port_test( + t, root_dir, /*target=*/ child_window, /*target_origin=*/ '*'); + }, + 'Send and receive messages using a message port in a same origin ' + + 'window.'); + +directory_test(async (t, root_dir) => { + const blob_url = await create_message_target_blob_url(t); + const child_window = await open_window(t, blob_url); + await do_message_port_test( + t, root_dir, /*target=*/ child_window, /*target_origin=*/ '*'); +}, 'Send and receive messages using a message port in a blob window.'); + +directory_test( + async (t, root_dir) => { + const url = + `${kDocumentMessageTarget}?pipe=header(Content-Security-Policy` + + ', sandbox allow-scripts allow-same-origin)'; + const child_window = await open_window(t, url); + await do_message_port_test( + t, root_dir, /*target=*/ child_window, /*target_origin=*/ '*'); + }, + 'Send and receive messages using a message port in a sandboxed same ' + + 'origin window.'); |