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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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