mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,60 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Tests that the inspector toggle button shows and hides
|
||||
* the inspector panel as intended.
|
||||
*/
|
||||
|
||||
add_task(function* () {
|
||||
let { target, panel } = yield initWebAudioEditor(SIMPLE_CONTEXT_URL);
|
||||
let { panelWin } = panel;
|
||||
let { gFront, $, $$, EVENTS, InspectorView } = panelWin;
|
||||
let gVars = InspectorView._propsView;
|
||||
|
||||
let started = once(gFront, "start-context");
|
||||
|
||||
let events = Promise.all([
|
||||
get3(gFront, "create-node"),
|
||||
waitForGraphRendered(panelWin, 3, 2)
|
||||
]);
|
||||
reload(target);
|
||||
let [actors] = yield events;
|
||||
let nodeIds = actors.map(actor => actor.actorID);
|
||||
|
||||
ok(!InspectorView.isVisible(), "InspectorView hidden on start.");
|
||||
|
||||
// Open inspector pane
|
||||
$("#inspector-pane-toggle").click();
|
||||
yield once(panelWin, EVENTS.UI_INSPECTOR_TOGGLED);
|
||||
|
||||
ok(InspectorView.isVisible(), "InspectorView shown after toggling.");
|
||||
|
||||
ok(isVisible($("#web-audio-editor-details-pane-empty")),
|
||||
"InspectorView empty message should still be visible.");
|
||||
ok(!isVisible($("#web-audio-editor-tabs")),
|
||||
"InspectorView tabs view should still be hidden.");
|
||||
|
||||
// Close inspector pane
|
||||
$("#inspector-pane-toggle").click();
|
||||
yield once(panelWin, EVENTS.UI_INSPECTOR_TOGGLED);
|
||||
|
||||
ok(!InspectorView.isVisible(), "InspectorView back to being hidden.");
|
||||
|
||||
// Open again to test node loading while open
|
||||
$("#inspector-pane-toggle").click();
|
||||
yield once(panelWin, EVENTS.UI_INSPECTOR_TOGGLED);
|
||||
|
||||
ok(InspectorView.isVisible(), "InspectorView being shown.");
|
||||
ok(!isVisible($("#web-audio-editor-tabs")),
|
||||
"InspectorView tabs are still hidden.");
|
||||
|
||||
yield clickGraphNode(panelWin, findGraphNode(panelWin, nodeIds[1]));
|
||||
|
||||
ok(!isVisible($("#web-audio-editor-details-pane-empty")),
|
||||
"Empty message hides even when loading node while open.");
|
||||
ok(isVisible($("#web-audio-editor-tabs")),
|
||||
"Switches to tab view when loading node while open.");
|
||||
|
||||
yield teardown(target);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue