Files
sousa-gecko/testing/web-platform/tests/html/semantics/embedded-content/media-elements/autoplay-allowed-by-permissions-policy-attribute.https.sub.html
T
Marcos Cáceres b577121b2c Bug 2021677 [wpt PR 58325] - Migrate miscellaneous tests from Feature-Policy to Permissions-Policy, a=testonly
Automatic update from web-platform-tests
Migrate miscellaneous tests from Feature-Policy to Permissions-Policy (#58325)

* Migrate miscellaneous tests from Feature-Policy to Permissions-Policy

Update various test files across multiple directories to use Permissions-Policy
header instead of the deprecated Feature-Policy header. Directories affected:
- fenced-frame
- html/semantics/embedded-content/media-elements
- encrypted-media
- gamepad
- mediacapture-streams
- xhr
- client-hints
- fetch
- generic-sensor
- css/css-fonts

* Migrate misc tests: rename files to permissions-policy

Rename test files from *feature-policy* to *permissions-policy* for:
- css/css-fonts/font-display
- encrypted-media
- gamepad
- html/semantics/embedded-content/media-elements (autoplay)
- mediacapture-streams
- xhr

Also fixed title in xhr test to say 'Permissions Policy' instead of 'Feature Policy'.

Note: generic-sensor-feature-policy-test.sub.js is NOT renamed in this PR
because it's used by multiple other sensor directories that have their own PRs.
--

wpt-commits: 1903166ff1cbd94969eab39a61c349d45a226a93
wpt-pr: 58325
2026-03-16 10:13:09 +00:00

35 lines
1.3 KiB
HTML

<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=/common/media.js></script>
<script src=/permissions-policy/resources/permissions-policy.js></script>
<script src=/permissions-policy/resources/autoplay.js></script>
<script>
'use strict';
const same_origin_src = '/permissions-policy/resources/permissions-policy-autoplay.html';
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
same_origin_src;
const feature_name = 'Feature policy "autoplay"';
const header = 'allow="autoplay" attribute';
async_test(t => {
simulateGesture(t, () => {
test_feature_availability(
'autoplay', t, same_origin_src,
expect_feature_available_default, 'autoplay');
});
}, feature_name + ' can be enabled in same-origin iframe using ' + header);
async_test(t => {
simulateGesture(t, () => {
test_feature_availability(
'autoplay', t, cross_origin_src,
expect_feature_available_default, 'autoplay');
});
}, feature_name + ' can be enabled in cross-origin iframe using ' + header);
</script>
</body>