Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | /** |
michael@0 | 5 | * Tests if the editors contain the correct text when a program |
michael@0 | 6 | * becomes available. |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | function ifWebGLSupported() { |
michael@0 | 10 | let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL); |
michael@0 | 11 | let { gFront, ShadersEditorsView, EVENTS } = panel.panelWin; |
michael@0 | 12 | |
michael@0 | 13 | reload(target); |
michael@0 | 14 | yield promise.all([ |
michael@0 | 15 | once(gFront, "program-linked"), |
michael@0 | 16 | once(panel.panelWin, EVENTS.SOURCES_SHOWN) |
michael@0 | 17 | ]); |
michael@0 | 18 | |
michael@0 | 19 | let vsEditor = yield ShadersEditorsView._getEditor("vs"); |
michael@0 | 20 | let fsEditor = yield ShadersEditorsView._getEditor("fs"); |
michael@0 | 21 | |
michael@0 | 22 | |
michael@0 | 23 | is(vsEditor.getText().indexOf("gl_Position"), 170, |
michael@0 | 24 | "The vertex shader editor contains the correct text."); |
michael@0 | 25 | is(fsEditor.getText().indexOf("gl_FragColor"), 97, |
michael@0 | 26 | "The fragment shader editor contains the correct text."); |
michael@0 | 27 | |
michael@0 | 28 | yield teardown(panel); |
michael@0 | 29 | finish(); |
michael@0 | 30 | } |