blob: 91e60ea4844ff4cd4f9728976c9022c54bd91765 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test() {
let suite = InspectorTest.createAsyncSuite("Canvas.requestShaderSource");
suite.addTestCase({
name: "Canvas.requestShaderSource.ProgramId.Invalid",
description: "Invalid program identifiers should cause an error.",
test(resolve, reject) {
const programId = "INVALID_PROGRAM_ID";
const shaderType = "INVALID_SHADER_TYPE";
CanvasAgent.requestShaderSource(programId, shaderType, (error) => {
InspectorTest.expectThat(error, "Should produce an error.");
InspectorTest.log("Error: " + error);
resolve();
});
}
});
suite.runTestCasesAndFinish();
}
</script>
</head>
<body onload="runTest()">
<p>Common tests for Canvas.requestShaderSource command.</p>
</body>
</html>