Automatic update from web-platform-tests serial: Feature-Policy is now Permissions-Policy This change replaces web-platform-tests/wpt#37106, renaming all of the Feature Policy tests to Permissions Policy tests and using the infrastructure from /permissions-policy instead. Change-Id: I93a459d130cb4a65855fe6535cbea2bc7f64fa64 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4051441 Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> Auto-Submit: Reilly Grant <reillyg@chromium.org> Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/main@{#1075297} -- wpt-commits: fc98e1cc1146b0d23be9737ee4d67934a72ff9a7 wpt-pr: 37124
47 lines
1.7 KiB
HTML
47 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<body>
|
|
<script src=/resources/testharness.js></script>
|
|
<script src=/resources/testharnessreport.js></script>
|
|
<script src=/permissions-policy/resources/permissions-policy.js></script>
|
|
<script>
|
|
'use strict';
|
|
const sub = 'https://{{domains[www]}}:{{ports[https][0]}}';
|
|
const same_origin_src = '/permissions-policy/resources/permissions-policy-serial.html';
|
|
const cross_origin_src = sub + same_origin_src;
|
|
const same_origin_worker_frame_src =
|
|
'/permissions-policy/resources/permissions-policy-serial-worker.html';
|
|
const cross_origin_worker_frame_src = sub + same_origin_worker_frame_src;
|
|
const feature_name = 'Permissions policy "serial"';
|
|
const header = 'allow="serial" attribute';
|
|
|
|
async_test(t => {
|
|
test_feature_availability(
|
|
'serial.getPorts()', t, same_origin_src,
|
|
expect_feature_available_default, 'serial');
|
|
}, feature_name + ' can be enabled in same-origin iframe using ' + header);
|
|
|
|
async_test(t => {
|
|
test_feature_availability(
|
|
'serial.getPorts()', t, same_origin_worker_frame_src,
|
|
expect_feature_available_default, 'serial');
|
|
}, feature_name + ' can be enabled in a worker in same-origin iframe using ' +
|
|
header);
|
|
|
|
async_test(t => {
|
|
test_feature_availability(
|
|
'serial.getPorts()', t, cross_origin_src,
|
|
expect_feature_available_default, 'serial');
|
|
}, feature_name + ' can be enabled in cross-origin iframe using ' + header);
|
|
|
|
async_test(t => {
|
|
test_feature_availability(
|
|
'serial.getPorts()', t, cross_origin_worker_frame_src,
|
|
expect_feature_available_default, 'serial');
|
|
}, feature_name + ' can be enabled in a worker in cross-origin iframe using ' +
|
|
header);
|
|
|
|
fetch_tests_from_worker(new Worker(
|
|
'resources/serial-allowed-by-permissions-policy-worker.js'));
|
|
</script>
|
|
</body>
|