Skip to content

Commit

Permalink
relocate override tests to disabled-by-permissions-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Aug 21, 2024
1 parent 5d04e65 commit de74cc1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
23 changes: 23 additions & 0 deletions digital-credentials/disabled-by-permissions-policy.https.sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
</script>
21 changes: 0 additions & 21 deletions digital-credentials/override-permissions-policy.https.sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
</script>

0 comments on commit de74cc1

Please sign in to comment.