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.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * Tests if the editors contain the correct text when a program
6 * becomes available.
7 */
9 function ifWebGLSupported() {
10 let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
11 let { gFront, ShadersEditorsView, EVENTS } = panel.panelWin;
13 reload(target);
14 yield promise.all([
15 once(gFront, "program-linked"),
16 once(panel.panelWin, EVENTS.SOURCES_SHOWN)
17 ]);
19 let vsEditor = yield ShadersEditorsView._getEditor("vs");
20 let fsEditor = yield ShadersEditorsView._getEditor("fs");
23 is(vsEditor.getText().indexOf("gl_Position"), 170,
24 "The vertex shader editor contains the correct text.");
25 is(fsEditor.getText().indexOf("gl_FragColor"), 97,
26 "The fragment shader editor contains the correct text.");
28 yield teardown(panel);
29 finish();
30 }