forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix selectURL() loaded iframes not getting window.fence. (web-platfor…
…m-tests#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 <[email protected]> Commit-Queue: Liam Brady <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Reviewed-by: Xiaochen Zhou <[email protected]> Cr-Commit-Position: refs/heads/main@{#1413688} Co-authored-by: Liam Brady <[email protected]>
- Loading branch information
1 parent
1691f56
commit 03ab2bf
Showing
4 changed files
with
51 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters