REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer...
[WebKit-https.git] / LayoutTests / webgpu / queue-creation.html
1 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebGPUEnabled=true ] -->
2 <meta charset=utf-8>
3 <title>Get the GPUDevice and ask for the GPUQueue</title>
4 <body>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 <script src="js/webgpu-functions.js"></script>
8 <script>
9
10 'use strict';
11
12 promise_test(async t => {
13     assert_not_equals(navigator.gpu, undefined, "navigator.gpu exists");
14
15     const context = document.createElement("canvas").getContext("gpu");
16     assert_true(context instanceof GPUCanvasContext, "getContext returned a GPUCanvasContext.");
17
18     return getBasicDevice().then(async function(device) {
19         const queue = device.getQueue();
20         assert_true(queue instanceof GPUQueue, "getQueue returned a GPUQueue.");
21
22         queue.label = "Example label";
23         assert_equals(queue.label, "Example label", "queue.label was set.");
24     }, function() {
25     });
26 }, "getQueue() on GPUDevice.");
27
28 </script>
29 </body>