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 correct vertex and fragment shader sources are retrieved michael@0: * regardless of the order in which they were compiled and attached. michael@0: */ michael@0: michael@0: function ifWebGLSupported() { michael@0: let [target, debuggee, front] = yield initBackend(SHADER_ORDER_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: let fragSource = yield fragmentShader.getText(); michael@0: michael@0: ok(vertSource.contains("I'm a vertex shader!"), michael@0: "The correct vertex shader text was retrieved."); michael@0: ok(fragSource.contains("I'm a fragment shader!"), michael@0: "The correct fragment shader text was retrieved."); michael@0: michael@0: yield removeTab(target.tab); michael@0: finish(); michael@0: }