| <!DOCTYPE html> |
| <html> |
| <head> |
| <link rel="stylesheet" href="resources/create-context-utilities.css"> |
| <script src="../../http/tests/inspector/resources/inspector-test.js"></script> |
| <script src="resources/create-context-utilities.js"></script> |
| <script> |
| if (window.internals) |
| window.internals.settings.setWebGPUEnabled(true); |
| |
| function test() { |
| let suite = initializeTestSuite("Canvas.CreateContextWebGPU"); |
| |
| addSimpleTestCase({ |
| name: "Attached", |
| expression: `createAttachedCanvas("webgpu")`, |
| contextType: WI.Canvas.ContextType.WebGPU, |
| }); |
| |
| addSimpleTestCase({ |
| name: "Detached", |
| expression: `createDetachedCanvas("webgpu")`, |
| contextType: WI.Canvas.ContextType.WebGPU, |
| }); |
| |
| addCSSCanvasTestCase(WI.Canvas.ContextType.WebGPU); |
| |
| suite.runTestCasesAndFinish(); |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <p>Test that CanvasManager tracks creation and destruction of WebGPU canvases.</p> |
| </body> |
| </html> |