browser/devtools/shadereditor/test/browser_se_editors-contents.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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 }

mercurial