michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /** michael@0: * Tests if the shader editor shows the appropriate UI when opened. michael@0: */ michael@0: michael@0: function spawnTest() { michael@0: let [target, debuggee, panel] = yield initWebAudioEditor(SIMPLE_CONTEXT_URL); michael@0: let { gFront, $ } = panel.panelWin; michael@0: michael@0: is($("#reload-notice").hidden, false, michael@0: "The 'reload this page' notice should initially be visible."); michael@0: is($("#waiting-notice").hidden, true, michael@0: "The 'waiting for an audio context' notice should initially be hidden."); michael@0: is($("#content").hidden, true, michael@0: "The tool's content should initially be hidden."); michael@0: michael@0: let navigating = once(target, "will-navigate"); michael@0: let started = once(gFront, "start-context"); michael@0: michael@0: reload(target); michael@0: michael@0: yield navigating; michael@0: michael@0: is($("#reload-notice").hidden, true, michael@0: "The 'reload this page' notice should be hidden when navigating."); michael@0: is($("#waiting-notice").hidden, false, michael@0: "The 'waiting for an audio context' notice should be visible when navigating."); michael@0: is($("#content").hidden, true, michael@0: "The tool's content should still be hidden."); michael@0: michael@0: yield started; michael@0: michael@0: is($("#reload-notice").hidden, true, michael@0: "The 'reload this page' notice should be hidden after context found."); michael@0: is($("#waiting-notice").hidden, true, michael@0: "The 'waiting for an audio context' notice should be hidden after context found."); michael@0: is($("#content").hidden, false, michael@0: "The tool's content should not be hidden anymore."); michael@0: michael@0: yield teardown(panel); michael@0: finish(); michael@0: }