Bug 747550 - Style button doesn't work since bug 707809. r=dietrich

This commit is contained in:
Dave Camp 2012-04-20 15:11:16 -07:00
parent 22b714a005
commit 017974e19f
2 changed files with 8 additions and 4 deletions

View File

@ -368,10 +368,10 @@ InspectorUI.prototype = {
*/
toggleSidebar: function IUI_toggleSidebar()
{
if (!this.isSidebarOpen) {
this.showSidebar();
if (!this.sidebar.visible) {
this.sidebar.show();
} else {
this.hideSidebar();
this.sidebar.hide();
}
},

View File

@ -77,7 +77,7 @@ function runInspectorTests()
ok(!InspectorUI.toolbar.hidden, "toolbar is visible");
ok(InspectorUI.inspecting, "Inspector is inspecting");
ok(!InspectorUI.treePanel.isOpen(), "Inspector Tree Panel is not open");
ok(!InspectorUI.isSidebarOpen, "Inspector Sidebar is not open");
ok(!InspectorUI.sidebar.visible, "Inspector sidebar should not visible.");
ok(InspectorUI.highlighter, "Highlighter is up");
InspectorUI.inspectNode(doc.body);
InspectorUI.stopInspecting();
@ -91,6 +91,10 @@ function treePanelTests()
InspectorUI.INSPECTOR_NOTIFICATIONS.TREEPANELREADY);
ok(InspectorUI.treePanel.isOpen(), "Inspector Tree Panel is open");
InspectorUI.toggleSidebar();
ok(InspectorUI.sidebar.visible, "Inspector Sidebar should be open");
InspectorUI.toggleSidebar();
ok(!InspectorUI.sidebar.visible, "Inspector Sidebar should be closed");
InspectorUI.sidebar.show();
InspectorUI.currentInspector.once("sidebaractivated-computedview",
stylePanelTests)