Wed, 31 Dec 2014 06:09:35 +0100
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 spawnTest() { |
michael@0 | 9 | let [target, debuggee, panel] = yield initWebAudioEditor(SIMPLE_CONTEXT_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 an audio 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 started = once(gFront, "start-context"); |
michael@0 | 21 | |
michael@0 | 22 | reload(target); |
michael@0 | 23 | |
michael@0 | 24 | yield navigating; |
michael@0 | 25 | |
michael@0 | 26 | is($("#reload-notice").hidden, true, |
michael@0 | 27 | "The 'reload this page' notice should be hidden when navigating."); |
michael@0 | 28 | is($("#waiting-notice").hidden, false, |
michael@0 | 29 | "The 'waiting for an audio context' notice should be visible when navigating."); |
michael@0 | 30 | is($("#content").hidden, true, |
michael@0 | 31 | "The tool's content should still be hidden."); |
michael@0 | 32 | |
michael@0 | 33 | yield started; |
michael@0 | 34 | |
michael@0 | 35 | is($("#reload-notice").hidden, true, |
michael@0 | 36 | "The 'reload this page' notice should be hidden after context found."); |
michael@0 | 37 | is($("#waiting-notice").hidden, true, |
michael@0 | 38 | "The 'waiting for an audio context' notice should be hidden after context found."); |
michael@0 | 39 | is($("#content").hidden, false, |
michael@0 | 40 | "The tool's content should not be hidden anymore."); |
michael@0 | 41 | |
michael@0 | 42 | yield teardown(panel); |
michael@0 | 43 | finish(); |
michael@0 | 44 | } |