https://github.com/web-platform-tests/wpt
Raw File
Tip revision: e3a20f32ed973ef4117a5900929dd89fb6a42f5c authored by mkwst@chromium.org on 20 June 2017, 13:56:45 UTC
Implement `Clear-Site-Data: documents`.
Tip revision: e3a20f3
usb-allowed-by-feature-policy.https.sub.html
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=resources/featurepolicytest.js></script>
<script>
'use strict';

promise_test(
    () => navigator.usb.getDevices(),
    'Feature-Policy header {"usb": ["*"]} allows the top-level document.');

async_test(t => {
  assert_usb_available_in_iframe(t, '', '#OK');
}, 'Feature-Policy header {"usb": ["*"]} allows same-origin iframes.');

async_test(t => {
  assert_usb_available_in_iframe(t, 'https://{{domains[www]}}:{{ports[https][0]}}', '#OK');
}, 'Feature-Policy header {"usb": ["*"]} allows cross-origin iframes.');
</script>
</body>
back to top