From e017b222b2dbf6900e9e736d359048dcd54c3c27 Mon Sep 17 00:00:00 2001 From: Matt Reichhoff Date: Tue, 11 Oct 2022 11:52:00 +0000 Subject: [PATCH] Bug 1793065 [wpt PR 36144] - Replace SAA non-fully active SecurityError with InvalidStateError, a=testonly Automatic update from web-platform-tests Replace SAA non-fully active SecurityError with InvalidStateError See discussion on the related pull request: https://github.com/privacycg/storage-access/pull/112 Bug: 1354256 Change-Id: Ie2ac7890ae1039feca28b63239f02e476070e813 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3926236 Reviewed-by: Dominic Farolino Commit-Queue: Matt Reichhoff Cr-Commit-Position: refs/heads/main@{#1053043} -- wpt-commits: a1de4a7cd450ae83127f17c4dcb5aff1f0e1d83d wpt-pr: 36144 --- .../storage-access-api/requestStorageAccess.sub.window.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/web-platform/tests/storage-access-api/requestStorageAccess.sub.window.js b/testing/web-platform/tests/storage-access-api/requestStorageAccess.sub.window.js index e17034a2aafca..84d347875517d 100644 --- a/testing/web-platform/tests/storage-access-api/requestStorageAccess.sub.window.js +++ b/testing/web-platform/tests/storage-access-api/requestStorageAccess.sub.window.js @@ -47,12 +47,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");