summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fenced-frame/resources/utils.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /testing/web-platform/tests/fenced-frame/resources/utils.js
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/fenced-frame/resources/utils.js')
-rw-r--r--testing/web-platform/tests/fenced-frame/resources/utils.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/testing/web-platform/tests/fenced-frame/resources/utils.js b/testing/web-platform/tests/fenced-frame/resources/utils.js
index 462bda37fc..4914802518 100644
--- a/testing/web-platform/tests/fenced-frame/resources/utils.js
+++ b/testing/web-platform/tests/fenced-frame/resources/utils.js
@@ -162,8 +162,8 @@ async function generateURNFromFledgeRawURL(
// @param {boolean} [ad_with_size = false] - Determines whether the auction is
// run with ad sizes specified.
// @param {boolean} [register_beacon = false] - If true, FLEDGE logic will
-// register reporting beacons
-// after completion.
+// register reporting beacons after
+// completion.
async function generateURNFromFledge(
href, keylist, nested_urls = [], resolve_to_config = false,
ad_with_size = false, requested_size = null, register_beacon = false) {
@@ -347,6 +347,19 @@ function attachFrameContext(
num_components);
}
+// Performs a content-initiated navigation of a frame proxy. This navigated page
+// uses a new urn:uuid as its communication channel to prevent potential clashes
+// with the currently loaded document.
+async function navigateFrameContext(frame_proxy, {headers = [], origin = ''}) {
+ const [uuid, url] = generateRemoteContextURL(headers, origin);
+ frame_proxy.execute((url) => {
+ window.executor.suspend(() => {
+ window.location = url;
+ });
+ }, [url])
+ frame_proxy.context_id = uuid;
+}
+
function replaceFrameContext(frame_proxy, {
generator_api = '',
resolve_to_config = false,