Web Inspector: Canvas: add support for showing WebGPU contexts
[WebKit-https.git] / LayoutTests / inspector / canvas / create-context-webgl2.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="resources/create-context-utilities.css">
5 <script src="../../http/tests/inspector/resources/inspector-test.js"></script>
6 <script src="resources/create-context-utilities.js"></script>
7 <script>
8 if (window.internals)
9     window.internals.settings.setWebGL2Enabled(true);
10
11 function test() {
12     let suite = InspectorTest.CreateContextUtilities.initializeTestSuite("Canvas.CreateContextWebGL2");
13
14     InspectorTest.CreateContextUtilities.addSimpleTestCase({
15         name: "Attached",
16         expression: `createAttachedCanvas("webgl2")`,
17         contextType: WI.Canvas.ContextType.WebGL2,
18     });
19
20     InspectorTest.CreateContextUtilities.addSimpleTestCase({
21         name: "Detached",
22         expression: `createDetachedCanvas("webgl2")`,
23         contextType: WI.Canvas.ContextType.WebGL2,
24     });
25
26     InspectorTest.CreateContextUtilities.addCSSCanvasTestCase(WI.Canvas.ContextType.WebGL2);
27
28     suite.runTestCasesAndFinish();
29 }
30 </script>
31 </head>
32 <body onload="runTest()">
33     <p>Test that CanvasManager tracks creation and destruction of WebGL2 canvases.</p>
34 </body>
35 </html>