[SAA] Check cookie access and permission access

We need to check if either permission was granted *or* if full cookie
access was granted as pre-3PCD the permission isn't possible to set and
post-3PCD full cookie access remains sufficient, but is not necessary
as permission access is possible without enabling full cookie access.

Fixed: 350426228
Change-Id: I51cec95889cc9cbe8caddf631a019dad6d8037a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5675704
Reviewed-by: Johann Hofmann <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Johann Hofmann <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1322965}
diff --git a/chrome/browser/net/storage_test_utils.h b/chrome/browser/net/storage_test_utils.h
index ade0092..2f2d3a1 100644
--- a/chrome/browser/net/storage_test_utils.h
+++ b/chrome/browser/net/storage_test_utils.h
@@ -48,6 +48,11 @@
 // document.hasStorageAccess(). If either call rejects, this helper DCHECKs.
 bool RequestAndCheckStorageAccessForFrame(content::RenderFrameHost* frame,
                                           bool omit_user_gesture = false);
+// Helper to request storage access for a frame using
+// document.requestStorageAccess({estimate: true}) and then check the
+// functionality of the handle.
+bool RequestAndCheckStorageAccessBeyondCookiesForFrame(
+    content::RenderFrameHost* frame);
 // Helper to request storage access with a site override for a frame using
 // document.requestStorageAccessFor(origin). Returns true if the promise
 // resolves; false if it rejects.