browser/devtools/webaudioeditor/test/browser_wa_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.

     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 }

mercurial