usb-allowed-by-permissions-policy-worker.js (279B)
1 'use strict'; 2 3 importScripts('/resources/testharness.js'); 4 5 let workerType; 6 7 if (typeof postMessage === 'function') { 8 workerType = 'dedicated'; 9 } 10 11 promise_test(() => navigator.usb.getDevices(), 12 `Inherited header permissions policy allows ${workerType} workers.`); 13 14 done();