7b0a4cff90d3392c93f847b670fae90476c00cfa
[WebKit-https.git] / LayoutTests / inspector / canvas / updateShader.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../http/tests/inspector/resources/inspector-test.js"></script>
5 <script>
6 function test() {
7     let suite = InspectorTest.createAsyncSuite("Canvas.updateShader");
8
9     suite.addTestCase({
10         name: "Canvas.updateShader.ProgramId.Invalid",
11         description: "Invalid program identifiers should cause an error.",
12         test(resolve, reject) {
13             const programId = "INVALID_PROGRAM_ID";
14             const shaderType = "INVALID_SHADER_TYPE";
15             const source = "INVALID_SOURCE";
16             CanvasAgent.updateShader(programId, shaderType, source, (error) => {
17                 InspectorTest.expectThat(error, "Should produce an error.");
18                 InspectorTest.log("Error: " + error);
19                 resolve();
20             });
21         }
22     });
23
24     suite.runTestCasesAndFinish();
25 }
26 </script>
27 </head>
28 <body onload="runTest()">
29 <p>Common tests for Canvas.updateShader command.</p>
30 </body>
31 </html>