Skip to content

Commit

Permalink
Add check for invalid origins - requestStorageAccessFor
Browse files Browse the repository at this point in the history
Bug: 1505841
Change-Id: Icd117212acaa0f8f1421fdbb9f7e3860af63188e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5085211
Reviewed-by: Dominic Farolino <[email protected]>
Reviewed-by: Chris Fredrickson <[email protected]>
Reviewed-by: Ayu Ishii <[email protected]>
Commit-Queue: Edwin Daniel <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1234753}
  • Loading branch information
edwindaniel22 authored and chromium-wpt-export-bot committed Dec 7, 2023
1 parent 24b2021 commit 398e3d8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ promise_test(
'[top-level-context] document.requestStorageAccessFor() should be resolved when called properly with a user gesture and the same origin');

promise_test(
async t => {
await RunCallbackWithGesture(
() => promise_rejects_dom(t, 'NotAllowedError', document.requestStorageAccessFor('bogus-url'),
async t =>{
await RunCallbackWithGesture(
() => promise_rejects_js(t, TypeError, document.requestStorageAccessFor('bogus-url'),
'document.requestStorageAccessFor() call with bogus URL'));
},
'[top-level-context] document.requestStorageAccessFor() should be rejected when called with an invalid origin');
Expand Down

0 comments on commit 398e3d8

Please sign in to comment.