• Brandon Walderman's avatar
    Implement Storage Access commands for TestDriver · a02f2df5
    Brandon Walderman authored
    This change implements the Set Storage Access command for TestDriver in
    Blink and content_shell:
    https://privacycg.github.io/storage-access/#automation
    
    This is needed to support more in-depth WPT tests for the Storage
    Access API. The current WPT tests for this feature cover basic IDL
    behavior, but are not able to verify that the requestStorageAccess API
    itself is functional because the browser must first be put into a state
    where third-party cookies are blocked.
    
    A new set_storage_access method has been added to testdriver.js. It
    functions similarly to the existing set_permission method. This calls a
    Blink-internal method that forwards the passed in arguments to the
    content shell via Mojo. A new WebTestStorageAccessManager class in the
    content shell converts the arguments into ContentSettingsPatterns and
    passes these settings to the CookieManager. The
    WebTestStorageAccessManager also enables third-party cookie blocking so
    that these rules will take effect.
    
    Bug: 1096803
    Change-Id: I635687e7d00cf95fa2cf54fb86e1f65a0fe85f3f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253280Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
    Reviewed-by: default avatarMike West <mkwst@chromium.org>
    Commit-Queue: Brandon Walderman <brwalder@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#790441}
    a02f2df5
DEPS 279 Bytes