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

16 lines
292 B
JavaScript

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