Skip to content

Commit a180d06

Browse files
Brandr0idmoz-wptsync-bot
authored andcommitted
Bug 1637100 [wpt PR 23515] - Update Storage Access API Logic & E2E Tests, a=testonly
Automatic update from web-platform-tests Update Storage Access API Logic & E2E Tests This change updates the logic used in the Blink document for document.hasStorageAccess and document.requestStorageAccess. Gates have been added to ensure the proper restrictions such as having a non-opaque origin, sandbox token (if applicable), as well as ensuring that hasStorageAccess reflects the actual state of storage access on the page. Additionally defense in depth logic checks have been added in StorageAccessGrantPermissionContext to shortcut if we get a request for a scenario no grant would be needed. Some additional cleanup is included with this change to remove the temporary usage of CONTENT_SETTING_SESSION in StorageAccessGrantPermissionContext and to ensure all content settings updates will propagate to the network service. A follow up change will ensure this does not result in duplicate updates when we perform our initial update. Browser tests have been added to validate end to end functionality. Bug: 989663 Change-Id: I09fdc115a30a71e341961b385a2e2e05fd161536 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2194905 Reviewed-by: Maksim Orlovich <[email protected]> Reviewed-by: Christian Dullweber <[email protected]> Reviewed-by: Mike West <[email protected]> Reviewed-by: Theresa <[email protected]> Reviewed-by: Balazs Engedy <[email protected]> Commit-Queue: Brandon Maslen <[email protected]> Cr-Commit-Position: refs/heads/master@{#769847} -- wpt-commits: 619f6fa4dff862035b18d9adf721ecf599522ea0 wpt-pr: 23515
1 parent 1042442 commit a180d06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/web-platform/tests/storage-access-api/hasStorageAccess.sub.window.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ if (topLevelDocument) {
5555
RunTestsInIFrame("hasStorageAccess.sub.window.html?testCase=same-origin-frame&rootdocument=false");
5656

5757
// Create a test with a single-child cross-origin iframe.
58-
RunTestsInIFrame("http://{{domains[www]}}:{{ports[http][0]}}/storage-access-api/hasStorageAccess.sub.window.html?testCase=cross-origin-frame&allowed=false&rootdocument=false");
58+
RunTestsInIFrame("http://{{domains[www]}}:{{ports[http][0]}}/storage-access-api/hasStorageAccess.sub.window.html?testCase=cross-origin-frame&rootdocument=false");
5959

6060
// Validate the nested-iframe scenario where the same-origin frame containing
6161
// the tests is not the first child.
6262
RunTestsInNestedIFrame("hasStorageAccess.sub.window.html?testCase=nested-same-origin-frame&rootdocument=false");
6363

6464
// Validate the nested-iframe scenario where the cross-origin frame containing
6565
// the tests is not the first child.
66-
RunTestsInNestedIFrame("http://{{domains[www]}}:{{ports[http][0]}}/storage-access-api/hasStorageAccess.sub.window.html?testCase=nested-cross-origin-frame&allowed=false&rootdocument=false");
66+
RunTestsInNestedIFrame("http://{{domains[www]}}:{{ports[http][0]}}/storage-access-api/hasStorageAccess.sub.window.html?testCase=nested-cross-origin-frame&rootdocument=false");
6767
}

0 commit comments

Comments
 (0)