AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
[WebKit-https.git] / LayoutTests / webgpu / render-pipelines.html
1 <!DOCTYPE html>
2 <html>
3 <script src="js/webgpu-functions.js"></script>
4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script>
6 <script>
7 const shaderCode = `
8 #include <metal_stdlib>
9     
10 using namespace metal;
11
12 struct Vertex
13 {
14     float4 position [[position]];
15 };
16
17 vertex Vertex vertex_main(uint vid [[vertex_id]])
18 {
19     Vertex v;
20     switch (vid) {
21     case 0:
22         v.position = float4(-1, 1, 0, 1);
23         break;
24     case 1:
25         v.position = float4(-1, -1, 0, 1);
26         break;
27     case 2:
28         v.position = float4(1, 1, 0, 1);
29         break;
30     default:
31         v.position = float4(1, -1, 0, 1);
32     }
33     return v;
34 }
35
36 fragment float4 fragment_main(Vertex vertexIn [[stage_in]])
37 {
38     return float4(0.0, 1.0, 0.0, 1.0);
39 }
40 `
41
42 promise_test(async () => {
43     const device = await getBasicDevice();
44     const shaderModule = device.createShaderModule({ code: shaderCode });
45
46     const layoutBinding = { binding: 0, visibility: GPUShaderStageBit.VERTEX, type: "storage-buffer" };
47     const bindGroupLayout = device.createBindGroupLayout({ bindings: [layoutBinding] });
48     const pipelineLayout = device.createPipelineLayout({ bindGroupLayouts: [bindGroupLayout] });
49
50     const pipeline = createBasicPipeline(shaderModule, device, null, pipelineLayout);
51     assert_true(pipeline instanceof WebGPURenderPipeline, "Successfully created WebGPURenderPipeline");
52 }, "Create basic WebGPURenderPipeline");
53 </script>
54 </html>