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.
In order for these to work we need to actually shim user interactions and permission grants. The prior code only works for content_shell. One thing we can't seem to test now is what happens if cookies are partitioned. That doesn't seem to be enabled here and the way we can fake that for content_shell doesn't work. Looking to fix: https://wpt.fyi/results/storage-access-api?label=experimental&label=master&aligned Using the commands from: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/run_web_platform_tests.md Change-Id: I122258d0cc9f3449d3e84526b689f86a92d84333 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5301177 Auto-Submit: Ari Chivukula <[email protected]> Reviewed-by: Kyra Seevers <[email protected]> Commit-Queue: Ari Chivukula <[email protected]> Cr-Commit-Position: refs/heads/main@{#1261875}
- Loading branch information
1 parent
6bad5f5
commit ee84ad2
Showing
15 changed files
with
100 additions
and
37 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
storage-access-api/resources/bless_cross_site_permissions.html
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,17 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<body> | ||
<script> | ||
// In order to enable `requestStorageAccess` in a third-party context for some | ||
// origin we must first act in a window where that same origin is the top-frame | ||
// due to the following requirements: | ||
// (1) The origin must be `bless`ed when it's in the top-frame | ||
// (2) `set_permission` always operates on the top-frame origin | ||
test_driver.set_test_context(window.opener.top); | ||
test_driver.bless("fake interaction", () => {}, window); | ||
test_driver.set_permission({ name: 'storage-access' }, 'granted'); | ||
window.opener.postMessage("blessed", "*"); | ||
</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
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
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
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
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
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
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