summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/serial/resources/serial-allowed-by-permissions-policy-worker.js
blob: cef0aacdfc3d2f755b185439679706318935df17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use strict';

importScripts('/resources/testharness.js');

let workerType;

if (typeof postMessage === 'function') {
  workerType = 'dedicated';
}

promise_test(() => navigator.serial.getPorts(),
    `Inherited header permissions policy allows ${workerType} workers.`);

done();