Bug 938980 - [Australis] Restore Defaults will not reshow the address bar if it has been hidden through channel switching. r=Gijs

This commit is contained in:
Jared Wein 2013-11-19 17:27:06 -05:00
Родитель 4ea195c1c6
Коммит 02af5f5d6b
3 изменённых файлов: 33 добавлений и 0 удалений

Просмотреть файл

@ -359,6 +359,12 @@ let CustomizableUIInternal = {
this.beginBatchUpdate();
// Restore nav-bar visibility since it may have been hidden
// through a migration path (bug 938980) or an add-on.
if (aArea == CustomizableUI.AREA_NAVBAR) {
aAreaNode.collapsed = false;
}
let currentNode = container.firstChild;
let placementsToRemove = new Set();
for (let id of aPlacements) {

Просмотреть файл

@ -35,4 +35,5 @@ skip-if = true
# Because this test is about the menubar, it can't be run on mac
skip-if = os == "mac"
[browser_938980_navbar_collapsed.js]
[browser_panel_toggle.js]

Просмотреть файл

@ -0,0 +1,26 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let gTests = [
{
desc: "Customization reset should restore visibility to default-visible toolbars.",
setup: null,
run: function() {
let navbar = document.getElementById("nav-bar");
is(navbar.collapsed, false, "Test should start with navbar visible");
navbar.collapsed = true;
is(navbar.collapsed, true, "navbar should be hidden now");
yield resetCustomization();
is(navbar.collapsed, false, "Customization reset should restore visibility to the navbar");
},
teardown: null
},
];
function test() {
waitForExplicitFinish();
runTests(gTests);
}