browser/devtools/shadereditor/test/browser_se_first-run.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

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 shader editor shows the appropriate UI when opened.
michael@0 6 */
michael@0 7
michael@0 8 function ifWebGLSupported() {
michael@0 9 let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
michael@0 10 let { gFront, $ } = panel.panelWin;
michael@0 11
michael@0 12 is($("#reload-notice").hidden, false,
michael@0 13 "The 'reload this page' notice should initially be visible.");
michael@0 14 is($("#waiting-notice").hidden, true,
michael@0 15 "The 'waiting for a WebGL context' notice should initially be hidden.");
michael@0 16 is($("#content").hidden, true,
michael@0 17 "The tool's content should initially be hidden.");
michael@0 18
michael@0 19 let navigating = once(target, "will-navigate");
michael@0 20 let linked = once(gFront, "program-linked");
michael@0 21 reload(target);
michael@0 22
michael@0 23 yield navigating;
michael@0 24
michael@0 25 is($("#reload-notice").hidden, true,
michael@0 26 "The 'reload this page' notice should be hidden when navigating.");
michael@0 27 is($("#waiting-notice").hidden, false,
michael@0 28 "The 'waiting for a WebGL context' notice should be visible when navigating.");
michael@0 29 is($("#content").hidden, true,
michael@0 30 "The tool's content should still be hidden.");
michael@0 31
michael@0 32 yield linked;
michael@0 33
michael@0 34 is($("#reload-notice").hidden, true,
michael@0 35 "The 'reload this page' notice should be hidden after linking.");
michael@0 36 is($("#waiting-notice").hidden, true,
michael@0 37 "The 'waiting for a WebGL context' notice should be hidden after linking.");
michael@0 38 is($("#content").hidden, false,
michael@0 39 "The tool's content should not be hidden anymore.");
michael@0 40
michael@0 41 yield teardown(panel);
michael@0 42 finish();
michael@0 43 }

mercurial