Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * Tests if the shader editor shows the appropriate UI when opened.
6 */
8 function ifWebGLSupported() {
9 let [target, debuggee, panel] = yield initShaderEditor(SIMPLE_CANVAS_URL);
10 let { gFront, $ } = panel.panelWin;
12 is($("#reload-notice").hidden, false,
13 "The 'reload this page' notice should initially be visible.");
14 is($("#waiting-notice").hidden, true,
15 "The 'waiting for a WebGL context' notice should initially be hidden.");
16 is($("#content").hidden, true,
17 "The tool's content should initially be hidden.");
19 let navigating = once(target, "will-navigate");
20 let linked = once(gFront, "program-linked");
21 reload(target);
23 yield navigating;
25 is($("#reload-notice").hidden, true,
26 "The 'reload this page' notice should be hidden when navigating.");
27 is($("#waiting-notice").hidden, false,
28 "The 'waiting for a WebGL context' notice should be visible when navigating.");
29 is($("#content").hidden, true,
30 "The tool's content should still be hidden.");
32 yield linked;
34 is($("#reload-notice").hidden, true,
35 "The 'reload this page' notice should be hidden after linking.");
36 is($("#waiting-notice").hidden, true,
37 "The 'waiting for a WebGL context' notice should be hidden after linking.");
38 is($("#content").hidden, false,
39 "The tool's content should not be hidden anymore.");
41 yield teardown(panel);
42 finish();
43 }