[WebGPU] Move 'gpu' API entry point from DOMWindow to Navigator
[WebKit-https.git] / LayoutTests / webgpu / webgpu-enabled-in-worker.html
1 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebGPUEnabled=true ] -->
2 <html>
3 <meta charset=utf-8>
4 <title>Test if WebGPU is enabled for workers.</title>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 <script>
8 if (window.testRunner)
9     testRunner.waitUntilDone();
10
11 const worker = new Worker('js/create-worker-device.js');
12
13 worker.onmessage = event => {
14     test(() => { assert_true(event.data, "Create GPUDevice with a worker."); });
15
16     if (window.testRunner)
17         testRunner.notifyDone();
18 };
19 </script>
20 </html>