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

14 lines
276 B
JavaScript

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