From de74cc1c9bafe627e39f9deb00edb94198a266ba Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Wed, 21 Aug 2024 11:35:32 +1000 Subject: [PATCH] relocate override tests to disabled-by-permissions-policy --- ...abled-by-permissions-policy.https.sub.html | 23 +++++++++++++++++++ ...override-permissions-policy.https.sub.html | 21 ----------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/digital-credentials/disabled-by-permissions-policy.https.sub.html b/digital-credentials/disabled-by-permissions-policy.https.sub.html index 65b58066349daef..2adff986164ca73 100644 --- a/digital-credentials/disabled-by-permissions-policy.https.sub.html +++ b/digital-credentials/disabled-by-permissions-policy.https.sub.html @@ -33,4 +33,27 @@ needs_focus: true, }); }, "Permissions-Policy header digital-credentials-get=() disallows same-origin iframes."); + + promise_test(async (test) => { + await test_feature_availability({ + feature_description: "Digital Credential API", + test, + src: cross_origin_src, + expect_feature_available: expect_feature_available_default, + feature_name: "digital-credentials-get", + is_promise_test: true, + needs_focus: true, + }); + }, "Header-set policy is overridden in cross-origin iframe using allow attribute."); + + promise_test(async (test) => { + await test_feature_availability({ + feature_description: "Digital Credential API", + test, + src: same_origin_src, + expect_feature_available: expect_feature_unavailable_default, + is_promise_test: true, + needs_focus: true, + }); + }, "Setting digital-credentials-get=(self) disallows the API in same-origin iframes."); diff --git a/digital-credentials/override-permissions-policy.https.sub.html b/digital-credentials/override-permissions-policy.https.sub.html index 393949f4116d2f4..ab377a3bd0ecfb9 100644 --- a/digital-credentials/override-permissions-policy.https.sub.html +++ b/digital-credentials/override-permissions-policy.https.sub.html @@ -14,26 +14,5 @@ "/permissions-policy/resources/digital-credentials-get.html"; const cross_origin_src = new URL(same_origin_src, HTTPS_REMOTE_ORIGIN).href; - promise_test(async (test) => { - await test_feature_availability({ - feature_description: "Digital Credential API", - test, - src: cross_origin_src, - expect_feature_available: expect_feature_available_default, - feature_name: "digital-credentials-get", - is_promise_test: true, - needs_focus: true, - }); - }, "Header-set policy is overridden in cross-origin iframe using allow attribute."); - promise_test(async (test) => { - await test_feature_availability({ - feature_description: "Digital Credential API", - test, - src: same_origin_src, - expect_feature_available: expect_feature_unavailable_default, - is_promise_test: true, - needs_focus: true, - }); - }, "Setting digital-credentials-get=(self) disallows the API in same-origin iframes.");