michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /** michael@0: * Tests that the source contents can be retrieved from the vertex and fragment michael@0: * shader actors. michael@0: */ michael@0: michael@0: function ifWebGLSupported() { michael@0: let [target, debuggee, front] = yield initBackend(SIMPLE_CANVAS_URL); michael@0: front.setup({ reload: true }); michael@0: michael@0: let programActor = yield once(front, "program-linked"); michael@0: let vertexShader = yield programActor.getVertexShader(); michael@0: let fragmentShader = yield programActor.getFragmentShader(); michael@0: michael@0: let vertSource = yield vertexShader.getText(); michael@0: ok(vertSource.contains("gl_Position"), michael@0: "The correct vertex shader source was retrieved."); michael@0: michael@0: let fragSource = yield fragmentShader.getText(); michael@0: ok(fragSource.contains("gl_FragColor"), michael@0: "The correct fragment shader source was retrieved."); michael@0: michael@0: yield removeTab(target.tab); michael@0: finish(); michael@0: }