3 // This script depends on the following scripts:
4 // /file-system-access/resources/messaging-helpers.js
5 // /file-system-access/resources/messaging-blob-helpers.js
6 // /file-system-access/resources/messaging-serialize-helpers.js
7 // /file-system-access/resources/test-helpers.js
10 async (t, root_dir) => {
11 const child_window = await open_window(t, kDocumentMessageTarget);
12 await do_message_port_test(
13 t, root_dir, /*target=*/ child_window, /*target_origin=*/ '*');
15 'Send and receive messages using a message port in a same origin ' +
18 directory_test(async (t, root_dir) => {
19 const blob_url = await create_message_target_blob_url(t);
20 const child_window = await open_window(t, blob_url);
21 await do_message_port_test(
22 t, root_dir, /*target=*/ child_window, /*target_origin=*/ '*');
23 }, 'Send and receive messages using a message port in a blob window.');
26 async (t, root_dir) => {
28 `${kDocumentMessageTarget}?pipe=header(Content-Security-Policy` +
29 ', sandbox allow-scripts allow-same-origin)';
30 const child_window = await open_window(t, url);
31 await do_message_port_test(
32 t, root_dir, /*target=*/ child_window, /*target_origin=*/ '*');
34 'Send and receive messages using a message port in a sandboxed same ' +