[go: nahoru, domu]

Move WPT COOP/reporting/resources to COOP/resources

Move the dispatcher/executor/redirect files that are used by both
reporting and non-reporting tests to the parent folder.
Try-access.js is not added by default to the executor anymore, and
is instead included following an order built with
resources/common.js's add_script_and_trigger_onload.

Change-Id: I3ac36b2dd0a9e677d3eb2334b657f122a4cf17ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2771578
Auto-Submit: Pâris Meuleman <pmeuleman@chromium.org>
Commit-Queue: Pâris Meuleman <pmeuleman@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#864297}
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/navigate-to-aboutblank.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/navigate-to-aboutblank.https.html
index 8e3da11..77de5a0 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/navigate-to-aboutblank.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/navigate-to-aboutblank.https.html
@@ -6,9 +6,7 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="reporting/resources/dispatcher.js"></script>
-<script src="reporting/resources/try-access.js"></script>
-
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
 
 <p>Non-initial empty documents (about:blank) should inherit their
   cross-origin-opener-policy from the navigation's initiator top level document,
@@ -27,7 +25,7 @@
 
 <script>
 const directory = "/html/cross-origin-opener-policy";
-const executor_path = directory + "/reporting/resources/executor.html?pipe=";
+const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin = get_host_info().HTTPS_ORIGIN;
 const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
 const coop_same_origin_header =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/navigate-top-to-aboutblank.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/navigate-top-to-aboutblank.https.html
index 34a75cee..1dd65fc 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/navigate-top-to-aboutblank.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/navigate-top-to-aboutblank.https.html
@@ -6,8 +6,7 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="reporting/resources/dispatcher.js"></script>
-<script src="reporting/resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
 
 
 <p>Non-initial empty documents (about:blank) should inherit their
@@ -29,7 +28,7 @@
 
 <script>
 const directory = "/html/cross-origin-opener-policy";
-const executor_path = directory + "/reporting/resources/executor.html?pipe=";
+const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin = get_host_info().HTTPS_ORIGIN;
 const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
 const coop_same_origin_header =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https.html
index 7690f23..7145d4c 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https.html
@@ -8,12 +8,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="./reporting/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
 
 <div id=log></div>
 <script>
 
-const executor_path = "/html/cross-origin-opener-policy/reporting/resources/executor.html?pipe=";
+const executor_path = "/html/cross-origin-opener-policy/resources/executor.html?pipe=";
 const same_origin = {
   host: get_host_info().HTTPS_ORIGIN,
   name: "Same origin"
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro.https.html
index 2744b8e6..0a98e3b 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro.https.html
@@ -7,11 +7,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const redirect_path = directory + "/resources/redirect.py?";
 const same_origin = get_host_info().HTTPS_ORIGIN;
@@ -56,10 +57,10 @@
   assert_equals("ACK 2", await receive(this_window_token));
 
   // 4. The opener tries to access its openee.
-  send(opener_token, `
-    tryAccess(openee);
-  `);
-
+  send(opener_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(openee);")
+  );
   // 5. Check a report sent to the opener.
   let report =
     await receiveReport(opener_report_token, "access-from-coop-page-to-openee")
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro_cross-origin.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro_cross-origin.https.html
index 8acbd44..58bfb6c 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro_cross-origin.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-openee_coop-ro_cross-origin.https.html
@@ -7,11 +7,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const redirect_path = directory + "/resources/redirect.py?";
 const same_origin = get_host_info().HTTPS_ORIGIN;
@@ -57,9 +58,11 @@
   assert_equals("ACK 2", await receive(this_window_token));
 
   // 4. The opener tries to access its openee.
-  send(opener_token, `
-    tryAccess(openee);
-  `);
+  send(opener_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(openee);")
+  );
+
 
   // 5. Check a report sent to the opener.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro.https.html
index b8be3be..ea58b66 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro.https.html
@@ -7,11 +7,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const redirect_path = directory + "/resources/redirect.py?";
 const same_origin = get_host_info().HTTPS_ORIGIN;
@@ -35,9 +36,11 @@
   t.add_cleanup(() => send(openee_token, "window.close()"))
 
   // 1. Try to access the opener. A report is sent, because of COOP-RO+COEP.
-  send(openee_token, `
-    tryAccess(opener);
-  `);
+
+  send(openee_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(opener);")
+  );
 
   // 2. Check a report is sent to the openee.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro_cross-origin.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro_cross-origin.https.html
index 6755ffa5..e19cc94 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro_cross-origin.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-opener_coop-ro_cross-origin.https.html
@@ -7,11 +7,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const redirect_path = directory + "/resources/redirect.py?";
 const same_origin = get_host_info().HTTPS_ORIGIN;
@@ -36,9 +37,10 @@
   t.add_cleanup(() => send(openee_token, "window.close()"))
 
   // 1. Try to access the opener. A report is sent, because of COOP-RO+COEP.
-  send(openee_token, `
-    tryAccess(opener);
-  `);
+  send(openee_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(opener);")
+  );
 
   // 2. Check a report is sent to the openee.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro.https.html
index e3e9574..bbb1f07f 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro.https.html
@@ -9,11 +9,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin = get_host_info().HTTPS_ORIGIN;
 const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
@@ -68,9 +69,10 @@
   assert_equals(await receive(this_window_token), "Loaded");
 
   // 5. "opener" accesses "other" window, through "openee".
-  send(opener_token, `
-    tryAccess(openee.other);
-  `);
+  send(opener_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(openee.other);")
+  );
 
   // 6. Check a report is sent to the openee.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro_cross-origin.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro_cross-origin.https.html
index 6d68d2c8..c105824 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro_cross-origin.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-from-coop-page-to-other_coop-ro_cross-origin.https.html
@@ -9,11 +9,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin= get_host_info().HTTPS_ORIGIN;
 const cross_origin= get_host_info().HTTPS_REMOTE_ORIGIN;
@@ -69,9 +70,11 @@
   assert_equals(await receive(this_window_token), "Loaded");
 
   // 5. "opener" accesses "other" window, through "openee".
-  send(opener_token, `
-    tryAccess(openee.other);
-  `);
+
+  send(opener_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(openee.other);")
+  );
 
   // 6. Check a report is sent to the openee.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro.https.html
index 8681ab4..9236764 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro.https.html
@@ -7,11 +7,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const redirect_path = directory + "/resources/redirect.py?";
 const same_origin = get_host_info().HTTPS_ORIGIN;
@@ -50,9 +51,10 @@
   t.add_cleanup(() => send(openee_token, "window.close()"));
 
   // 3. The openee tries to access its opener.
-  send(openee_token, `
-    tryAccess(opener);
-  `);
+  send(openee_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(opener);")
+  );
 
   // 4. Check a report sent to the opener.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro_cross-origin.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro_cross-origin.https.html
index 1380e50..f19ec50 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro_cross-origin.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-openee_coop-ro_cross-origin.https.html
@@ -7,11 +7,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const redirect_path = directory + "/resources/redirect.py?";
 const same_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
@@ -51,9 +52,10 @@
   t.add_cleanup(() => send(openee_token, "window.close()"));
 
   // 3. The openee tries to access its opener.
-  send(openee_token, `
-    tryAccess(opener);
-  `);
+  send(openee_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(opener);")
+  );
 
   // 4. Check a report sent to the opener.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro.https.html
index c7bcf8b..3b459cf 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro.https.html
@@ -7,11 +7,11 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const redirect_path = directory + "/resources/redirect.py?";
 const same_origin = get_host_info().HTTPS_ORIGIN;
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro_cross-origin.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro_cross-origin.https.html
index 19e794dc..3b123eb6 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro_cross-origin.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-opener_coop-ro_cross-origin.https.html
@@ -7,11 +7,11 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const redirect_path = directory + "/resources/redirect.py?";
 const same_origin = get_host_info().HTTPS_ORIGIN;
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro.https.html
index ecbc03c..af1514f0 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro.https.html
@@ -9,11 +9,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin = get_host_info().HTTPS_ORIGIN;
 const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
@@ -58,7 +59,10 @@
   assert_equals(await receive(this_window_token), "Loaded");
 
   // 4. The "other" window attempts to access the openee though the opener.
-  send(other_token, `tryAccess(opener.openee);`);
+  send(other_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(opener.openee);")
+  );
 
   // 4. Check a report sent to the openee.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro_cross-origin.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro_cross-origin.https.html
index 01315fc..523d039 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro_cross-origin.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/access-to-coop-page-from-other_coop-ro_cross-origin.https.html
@@ -9,11 +9,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin = get_host_info().HTTPS_ORIGIN;
 const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
@@ -59,7 +60,10 @@
   assert_equals(await receive(this_window_token), "Loaded");
 
   // 4. The "other" window attempts to access the openee though the opener.
-  send(other_token, `tryAccess(opener.openee);`);
+  send(other_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(opener.openee);")
+  );
 
   // 4. Check a report sent to the openee.
   let report =
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-blur.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-blur.https.html
index e10c8da..435ae592 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-blur.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-blur.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("blur", w => w.blur());
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-close.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-close.https.html
index a60841b0c..308236e 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-close.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-close.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("close", w => w.close());
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-closed.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-closed.https.html
index 98a5fe6..afb9c5ed 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-closed.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-closed.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("closed", w => w.closed);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-focus.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-focus.https.html
index 49220df..231a2e8f 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-focus.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-focus.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("focus", w => w.focus());
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-frames.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-frames.https.html
index 3109f6f..a5c0f2a 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-frames.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-frames.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("frames", w => w.frames);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-indexed-getter.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-indexed-getter.https.html
index d2309e5..07d6cd4 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-indexed-getter.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-indexed-getter.https.html
@@ -4,10 +4,10 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-length.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-length.https.html
index ba3ccf2..6a3b76b 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-length.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-length.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("length", w => w.length);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-location-get.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-location-get.https.html
index 1aec3147..78ae18f 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-location-get.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-location-get.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("location", w => w.location);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-location-set.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-location-set.https.html
index 6967833..96c5729 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-location-set.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-location-set.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("location", w => w.location = "#");
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html
index 2ab9093..83eb6118 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-named-getter.https.html
@@ -4,10 +4,10 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 let crossOrigin = ["cross-origin" , get_host_info().HTTPS_REMOTE_ORIGIN ];
 let sameOrigin =  ["same-site"    , get_host_info().HTTPS_ORIGIN        ];
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-get.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-get.https.html
index 0f684e1..f52345fb 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-get.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-get.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("opener", w => w.opener);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-set.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-set.https.html
index 6226c64..af1065f7 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-set.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-opener-set.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("opener", w => w.opener = "");
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-1.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-1.https.html
index 64022bb..47447cc 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-1.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-1.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("postMessage", w => w.postMessage("", ""));
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-2.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-2.https.html
index 30bd87d..1779b3d9 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-2.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-postmessage-2.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("postMessage", w => w.postMessage(""));
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-self.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-self.https.html
index 9e528d42..a10448d 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-self.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-self.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("self", w => w.self);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-top.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-top.https.html
index 4a4643e7..3470c4f 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-top.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-top.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("top", w => w.top);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-window.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-window.https.html
index 04bc277..6600006 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-window.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/property-window.https.html
@@ -3,8 +3,8 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/test-access-property.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/test-access-property.js"></script>
 <script>
 
 testAccessProperty("window", w => w.window);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/report-to-both_coop-ro.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/report-to-both_coop-ro.https.html
index 5c2dd1b..0560431 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/report-to-both_coop-ro.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/report-to-both_coop-ro.https.html
@@ -7,11 +7,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const origin_opener = get_host_info().HTTPS_ORIGIN;
 const origin_openee = get_host_info().HTTPS_REMOTE_ORIGIN;
@@ -76,7 +77,10 @@
     openee_token, openee_report_token, openee_url,
   ] = await genericSetup(test);
 
-  send(opener_token, `tryAccess(openee);`);
+  send(opener_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(openee);")
+  );
 
   let report_opener =
     await receiveReport(opener_report_token, "access-from-coop-page-to-openee")
@@ -99,7 +103,10 @@
     openee_token, openee_report_token, openee_url,
   ] = await genericSetup(test);
 
-  send(openee_token, `tryAccess(opener);`);
+  send(openee_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js",
+    "tryAccess(opener);")
+  );
 
   let report_opener =
     await receiveReport(opener_report_token, "access-to-coop-page-from-openee")
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html
index c45a468..efbe9c7 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html
@@ -9,11 +9,12 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/try-access.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/try-access.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin = get_host_info().HTTPS_ORIGIN;
 const cross_site = get_host_info().HTTPS_NOTSAMESITE_ORIGIN;
@@ -49,14 +50,15 @@
 
   // 4. The opener tries to access its openee. All reports for blocked access
   //    from the COOP page should notify the ReportingObservers.
-  send(opener_token, `
-    let observer = new ReportingObserver(()=>{});
-    observer.observe();
-    tryAccess(openee);
-    let reports = observer.takeRecords();
-    send("${this_window_token}", JSON.stringify(reports));
-    observer.disconnect();
-  `);
+  send(opener_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js", `
+      let observer = new ReportingObserver(()=>{});
+      observer.observe();
+      tryAccess(openee);
+      let reports = observer.takeRecords();
+      send("${this_window_token}", JSON.stringify(reports));
+      observer.disconnect();
+    `));
 
   let report_access_from = JSON.parse(await receive(this_window_token));
   assert_equals(report_access_from.length, 1, "No report received.");
@@ -71,14 +73,15 @@
 
   // 5. The openee tries to access its opener. No reports for blocked access
   //    to the COOP page should be dispatched.
-  send(openee_token, `
-    let observer = new ReportingObserver(()=>{});
-    observer.observe();
-    tryAccess(opener);
-    let reports = observer.takeRecords();
-    send("${this_window_token}", JSON.stringify(reports));
-    observer.disconnect();
-  `);
+  send(openee_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js", `
+      let observer = new ReportingObserver(()=>{});
+      observer.observe();
+      tryAccess(opener);
+      let reports = observer.takeRecords();
+      send("${this_window_token}", JSON.stringify(reports));
+      observer.disconnect();
+    `));
   let report_access_to = JSON.parse(await receive(this_window_token));
   assert_equals(report_access_to.length, 0, "Unexpected report received.");
 }, "Opener COOP");
@@ -109,14 +112,15 @@
 
   // 3. The openee tries to access its opener. All reports for blocked access
   //    from the COOP page should notify the ReportingObservers.
-  send(openee_token, `
-    let observer = new ReportingObserver(()=>{});
-    observer.observe();
-    tryAccess(opener);
-    let reports = observer.takeRecords();
-    send("${this_window_token}", JSON.stringify(reports));
-    observer.disconnect();
-  `);
+  send(openee_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js", `
+      let observer = new ReportingObserver(()=>{});
+      observer.observe();
+      tryAccess(opener);
+      let reports = observer.takeRecords();
+      send("${this_window_token}", JSON.stringify(reports));
+      observer.disconnect();
+    `));
   let report_access_from = JSON.parse(await receive(this_window_token));
   assert_equals(report_access_from.length, 1, "No report received.");
   assert_equals(report_access_from[0].type, "coop-access-violation");
@@ -131,14 +135,15 @@
 
   // 4. The opener tries to access its openee. No reports for blocked access
   //    to the COOP page should be dispatched.
-  send(opener_token, `
-    let observer = new ReportingObserver(()=>{});
-    observer.observe();
-    tryAccess(openee);
-    let reports = observer.takeRecords();
-    send("${this_window_token}", JSON.stringify(reports));
-    observer.disconnect();
-  `);
+  send(opener_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js", `
+      let observer = new ReportingObserver(()=>{});
+      observer.observe();
+      tryAccess(openee);
+      let reports = observer.takeRecords();
+      send("${this_window_token}", JSON.stringify(reports));
+      observer.disconnect();
+    `));
   let report_access_to = JSON.parse(await receive(this_window_token));
   assert_equals(report_access_to.length, 0, "Unexpected report received.");
 }, "Openee COOP");
@@ -193,7 +198,8 @@
   // 4. The opener's iframe tries to access the openee. This is an
   //    "access-from-coop-page" from a same-origin iframe, so the
   //    ReportingObserver(s) are notified.
-  send(opener_iframe_token, `tryAccess(openee);`);
+  send(opener_iframe_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js", `tryAccess(openee);`));
 
   let reports = await receive(this_window_token);
   reports = JSON.parse(reports);
@@ -260,7 +266,8 @@
   // 5. The opener's iframe tries to access the openee. This is an
   //    "access-from-coop-page" from a cross-site iframe. The ReportingObservers
   //    from the main document aren't notified.
-  send(opener_iframe_token, `tryAccess(openee);`);
+  send(opener_iframe_token, addScriptAndTriggerOnload(
+    directory + "/reporting/resources/try-access.js", `tryAccess(openee);`));
 
   let reports = await receive(this_window_token, 2000);
   assert_equals(reports, "timeout", "Unexpected report received.");
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html
index 9cee968..7b032b9 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html
@@ -5,9 +5,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html
index 33aa08e2b..6624bf0 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html
@@ -5,9 +5,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html
index 484152cf..3f6c064 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html
@@ -5,9 +5,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep-report-only.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep-report-only.https.html
index a03ddf5..af21bd8 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep-report-only.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep-report-only.https.html
@@ -5,9 +5,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep.https.html
index a03ddf5..af21bd8 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-with-coep.https.html
@@ -5,9 +5,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html
index ff3649f..ffa6bb8b 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html
@@ -5,9 +5,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https.html
index 858f31b..a546c26e 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https.html
@@ -6,10 +6,10 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin = get_host_info().HTTPS_ORIGIN;
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html
index dde4c40b3..0fda47e3 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html
@@ -2,8 +2,8 @@
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/utils.js"></script> <!-- Use token() to allow running tests in parallel -->
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html
index 576ab7d..6f464c1 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html
@@ -4,9 +4,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html
index 590ab3ff..0b3c6f8f 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html
@@ -4,9 +4,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>>
 <script>
 
 let tests = [
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html
index 6c929b0..d478cd0 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html
@@ -4,9 +4,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https.html
index 7c891bd0..b9c6844 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https.html
@@ -4,9 +4,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html
index b6f429c..f2fef9f6 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html
@@ -4,9 +4,9 @@
 <script src=/resources/testharnessreport.js></script>
 <script src="/common/get-host-info.sub.js"></script>
 <script src="/common/utils.js"></script>
-<script src="../../resources/common.js"></script>
-<script src="../resources/dispatcher.js"></script>
-<script src="../resources/reporting-common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/common.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/reporting/resources/reporting-common.js"></script>
 
 <script>
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html
index 616270d4..b40b32ec 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https.html
@@ -6,10 +6,10 @@
 <script src=/resources/testharnessreport.js></script>
 <script src=/common/get-host-info.sub.js></script>
 <script src="/common/utils.js"></script>
-<script src="../resources/dispatcher.js"></script>
+<script src="/html/cross-origin-opener-policy/resources/dispatcher.js"></script>
 <script>
 
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const same_origin = {
   host: get_host_info().HTTPS_ORIGIN,
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js
index 8c62147..825d460 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js
@@ -1,5 +1,5 @@
 
-const directory = "/html/cross-origin-opener-policy/reporting/resources";
+const directory = "/html/cross-origin-opener-policy/resources";
 const executor_path = directory + "/executor.html?pipe=";
 const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/test-access-property.js b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/test-access-property.js
index 0b804e8..4b5466a7 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/test-access-property.js
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/test-access-property.js
@@ -1,4 +1,4 @@
-const directory = "/html/cross-origin-opener-policy/reporting";
+const directory = "/html/cross-origin-opener-policy";
 const executor_path = directory + "/resources/executor.html?pipe=";
 const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)';
 
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/common.js b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/common.js
index 18656cd..a9412c6 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/common.js
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/common.js
@@ -2,6 +2,15 @@
 const SAME_SITE = {origin: get_host_info().HTTPS_REMOTE_ORIGIN, name: "SAME_SITE"};
 const CROSS_ORIGIN = {origin: get_host_info().HTTPS_NOTSAMESITE_ORIGIN, name: "CROSS_ORIGIN"}
 
+function addScriptAndTriggerOnload(src, onload){
+  return `script = document.createElement("script");
+  script.src= "${src}" ;
+  script. => {
+    ${onload}
+  };
+  document.head.append(script);`
+}
+
 function verify_window(callback, w, hasOpener) {
   // If there's no opener, the w must be closed:
   assert_equals(w.closed, !hasOpener, 'w.closed');
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/dispatcher.js b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/dispatcher.js
similarity index 97%
rename from third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/dispatcher.js
rename to third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/dispatcher.js
index dd96310..81dbbcc 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/dispatcher.js
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/dispatcher.js
@@ -7,7 +7,7 @@
 // It can also be used to receive reports.
 
 const dispatcher_path =
-    '/html/cross-origin-opener-policy/reporting/resources/dispatcher.py';
+    '/html/cross-origin-opener-policy/resources/dispatcher.py';
 const dispatcher_url = new URL(dispatcher_path, location.href).href;
 
 // Return a promise, limiting the number of concurrent accesses to a shared
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/dispatcher.py b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/dispatcher.py
similarity index 100%
rename from third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/dispatcher.py
rename to third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/dispatcher.py
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/executor.html b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/executor.html
similarity index 86%
rename from third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/executor.html
rename to third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/executor.html
index 9f38ebe2..a4e9207 100644
--- a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/executor.html
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/executor.html
@@ -1,5 +1,4 @@
 <script src="./dispatcher.js"></script>
-<script src="./try-access.js"></script>
 <script>
 
 const params = new URLSearchParams(window.location.search);
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/redirect.py b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/redirect.py
similarity index 100%
rename from third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/reporting/resources/redirect.py
rename to third_party/blink/web_tests/external/wpt/html/cross-origin-opener-policy/resources/redirect.py
diff --git a/third_party/blink/web_tests/external/wpt/lint.ignore b/third_party/blink/web_tests/external/wpt/lint.ignore
index f4c727b..247db1a 100644
--- a/third_party/blink/web_tests/external/wpt/lint.ignore
+++ b/third_party/blink/web_tests/external/wpt/lint.ignore
@@ -310,7 +310,7 @@
 SET TIMEOUT: html/cross-origin-embedder-policy/resources/reporting-worker.js
 SET TIMEOUT: html/cross-origin-opener-policy/navigate-to-aboutblank.https.html
 SET TIMEOUT: html/cross-origin-opener-policy/navigate-top-to-aboutblank.https.html
-SET TIMEOUT: html/cross-origin-opener-policy/reporting/resources/dispatcher.js
+SET TIMEOUT: html/cross-origin-opener-policy/resources/dispatcher.js
 SET TIMEOUT: html/dom/documents/dom-tree-accessors/Document.currentScript.html
 SET TIMEOUT: html/webappapis/timers/*
 SET TIMEOUT: orientation-event/resources/orientation-event-helpers.js