servo/tests/wpt/web-platform-tests/webusb/resources/usb-allowed-by-feature-policy-worker.js

14 lines
275 B
JavaScript

'use strict';
importScripts('/resources/testharness.js');
let workerType;
if (typeof postMessage === 'function') {
workerType = 'dedicated';
}
promise_test(() => navigator.usb.getDevices(),
`Inherited header feature policy allows ${workerType} workers.`);
done();