From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- .../web-platform/tests/fenced-frame/resources/utils.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'testing/web-platform/tests/fenced-frame/resources/utils.js') 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, -- cgit v1.2.3