Skip to content

Commit

Permalink
Replace SAA non-fully active SecurityError with InvalidStateError
Browse files Browse the repository at this point in the history
See discussion on the related pull request:
privacycg/storage-access#112

Bug: 1354256
Change-Id: Ie2ac7890ae1039feca28b63239f02e476070e813
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3926236
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Matt Reichhoff <mreichhoff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053043}
  • Loading branch information
mreichhoff authored and chromium-wpt-export-bot committed Sep 29, 2022
1 parent 1d9f9d7 commit a1de4a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage-access-api/requestStorageAccess.sub.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ if (topLevelDocument) {
const description = "document.requestStorageAccess() call in a detached frame";
// Can't use `promise_rejects_dom` here, since the error comes from the wrong global.
return promise.then(t.unreached_func("Should have rejected: " + description), (e) => {
assert_equals(e.name, 'SecurityError', description);
assert_equals(e.name, 'InvalidStateError', description);
});
}, "[non-fully-active] document.requestStorageAccess() should not resolve when run in a detached frame");

promise_test(t => {
return promise_rejects_dom(t, 'SecurityError', RunRequestStorageAccessViaDomParser(),
return promise_rejects_dom(t, 'InvalidStateError', RunRequestStorageAccessViaDomParser(),
"document.requestStorageAccess() in a detached DOMParser result");
}, "[non-fully-active] document.requestStorageAccess() should not resolve when run in a detached DOMParser document");

Expand Down

0 comments on commit a1de4a7

Please sign in to comment.