mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
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 <[email protected]> Auto-Submit: Reilly Grant <[email protected]> Commit-Queue: Raphael Kubo Da Costa <[email protected]> Cr-Commit-Position: refs/heads/main@{#1075297} -- wpt-commits: fc98e1cc1146b0d23be9737ee4d67934a72ff9a7 wpt-pr: 37124
28 lines
934 B
HTML
28 lines
934 B
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';
|
|
var same_origin_src = '/permissions-policy/resources/permissions-policy-serial.html';
|
|
var cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
|
|
same_origin_src;
|
|
var header = 'Default "serial" permissions policy "self"';
|
|
|
|
promise_test(
|
|
() => navigator.serial.getPorts(),
|
|
header + ' allows the top-level document.');
|
|
|
|
async_test(t => {
|
|
test_feature_availability('serial.getPorts()', t, same_origin_src,
|
|
expect_feature_available_default);
|
|
}, header + ' allows same-origin iframes.');
|
|
|
|
async_test(t => {
|
|
test_feature_availability('serial.getPorts()', t, cross_origin_src,
|
|
expect_feature_unavailable_default);
|
|
}, header + ' disallows cross-origin iframes.');
|
|
</script>
|
|
</body>
|