Automatic update from web-platform-tests Fix selectURL() loaded iframes not getting window.fence. (#50394) We are temporarily allowing APIs like Protected Audience and Shared Storage selectURL() to load into iframes as part of the fenced frame transition process. As part of this, we expose the fenced frame window.fence call to these kinds of iframes. This was launched as part of the fenced frames launch. See: https://chromestatus.com/feature/5699388062040064 A restriction currently exists where the config created by the API must have some kind of reporting metadata to give the iframe access to window.fence. This is a legacy restriction and is no longer necessary, and it results in selectURL()-created iframes without reporting metadata supplied from accessing window.fence. This CL fixes that by removing the restriction. It also adds a test to check the selectURL() without reporting path. It also updates the fenced frame WPT infrastructure to allow selectURL() to be invoked with or without reporting metadata. As part of this change, the renderer is no longer being told whether the fenced frame has reporting metadata. This is information that can be determined in the browser rather than calculating it on the renderer-side and then verifying the calculation in the browser, so having the renderer be part of this check is unnecessary. Change-Id: Ieec3cdaa31cd62bfe6fdb1993e13d68f00f00f28 Bug: 392650252 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6197762 Reviewed-by: Shivani Sharma <shivanisha@chromium.org> Commit-Queue: Liam Brady <lbrady@google.com> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Xiaochen Zhou <xiaochenzh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1413688} Co-authored-by: Liam Brady <lbrady@google.com> -- wpt-commits: 03ab2bf22955b20c141c326d10d9391ff48b19ce wpt-pr: 50394
32 lines
869 B
HTML
32 lines
869 B
HTML
<!DOCTYPE html>
|
|
<title>Test window.fence exists in URN iframes.</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/common/utils.js"></script>
|
|
<script src="/common/dispatcher/dispatcher.js"></script>
|
|
<script src="resources/utils.js"></script>
|
|
|
|
<body>
|
|
<script>
|
|
async function runTest(generator_api) {
|
|
const frame = await attachIFrameContext({
|
|
generator_api: generator_api,
|
|
register_beacon: false,
|
|
});
|
|
|
|
await frame.execute(() => {
|
|
assert_true(window.fence != null, "window.fence should exist");
|
|
});
|
|
}
|
|
|
|
promise_test(async () => {
|
|
return runTest("fledge");
|
|
}, 'window.fence in a URN iframe created with Protected Audience');
|
|
|
|
promise_test(async () => {
|
|
return runTest("sharedstorage");
|
|
}, 'window.fence in a URN iframe created with Shared Storage');
|
|
|
|
</script>
|
|
</body>
|