Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 spawnTest() {
9 let [target, debuggee, panel] = yield initWebAudioEditor(SIMPLE_CONTEXT_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 an audio 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 started = once(gFront, "start-context");
22 reload(target);
24 yield navigating;
26 is($("#reload-notice").hidden, true,
27 "The 'reload this page' notice should be hidden when navigating.");
28 is($("#waiting-notice").hidden, false,
29 "The 'waiting for an audio context' notice should be visible when navigating.");
30 is($("#content").hidden, true,
31 "The tool's content should still be hidden.");
33 yield started;
35 is($("#reload-notice").hidden, true,
36 "The 'reload this page' notice should be hidden after context found.");
37 is($("#waiting-notice").hidden, true,
38 "The 'waiting for an audio context' notice should be hidden after context found.");
39 is($("#content").hidden, false,
40 "The tool's content should not be hidden anymore.");
42 yield teardown(panel);
43 finish();
44 }