--- a/browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js
+++ b/browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js
@@ -15,17 +15,17 @@ function simulateItemDragAndEnd(aToDrag,
EventUtils.sendDragEvent({ type: "dragend", dataTransfer },
aToDrag.parentNode);
} finally {
ds.endDragSession(true);
}
}
add_task(function* checkNoAddingToPanel() {
- let area = CustomizableUI.AREA_PANEL;
+ let area = gPhotonStructure ? CustomizableUI.AREA_FIXED_OVERFLOW_PANEL : CustomizableUI.AREA_PANEL;
let previousPlacements = getAreaWidgetIds(area);
CustomizableUI.addWidgetToArea("separator", area);
CustomizableUI.addWidgetToArea("spring", area);
CustomizableUI.addWidgetToArea("spacer", area);
assertAreaPlacements(area, previousPlacements);
let oldNumberOfItems = previousPlacements.length;
if (getAreaWidgetIds(area).length != oldNumberOfItems) {
@@ -56,16 +56,17 @@ add_task(function* checkAddingToToolbar(
let oldNumberOfItems = previousPlacements.length;
if (getAreaWidgetIds(area).length != oldNumberOfItems) {
CustomizableUI.reset();
}
});
add_task(function* checkDragging() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
let startArea = CustomizableUI.AREA_NAVBAR;
let targetArea = CustomizableUI.AREA_PANEL;
let startingToolbarPlacements = getAreaWidgetIds(startArea);
let startingTargetPlacements = getAreaWidgetIds(targetArea);
CustomizableUI.addWidgetToArea("separator", startArea);
CustomizableUI.addWidgetToArea("spring", startArea);
CustomizableUI.addWidgetToArea("spacer", startArea);
--- a/browser/components/customizableui/test/browser_1008559_anchor_undo_restore.js
+++ b/browser/components/customizableui/test/browser_1008559_anchor_undo_restore.js
@@ -5,16 +5,17 @@
const kAnchorAttribute = "cui-anchorid";
/**
* Check that anchor gets set correctly when moving an item from the panel to the toolbar
* using 'undo'
*/
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield startCustomizing();
let button = document.getElementById("history-panelmenu");
is(button.getAttribute(kAnchorAttribute), "PanelUI-menu-button",
"Button (" + button.id + ") starts out with correct anchor");
let navbar = document.getElementById("nav-bar").customizationTarget;
simulateItemDrag(button, navbar);
is(CustomizableUI.getPlacementOfWidget(button.id).area, "nav-bar",
--- a/browser/components/customizableui/test/browser_1087303_button_fullscreen.js
+++ b/browser/components/customizableui/test/browser_1087303_button_fullscreen.js
@@ -1,15 +1,16 @@
/* 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/. */
"use strict";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check fullscreen button existence and functionality");
yield PanelUI.show();
let fullscreenButton = document.getElementById("fullscreen-button");
ok(fullscreenButton, "Fullscreen button appears in Panel Menu");
let fullscreenPromise = promiseFullscreenChange();
--- a/browser/components/customizableui/test/browser_1087303_button_preferences.js
+++ b/browser/components/customizableui/test/browser_1087303_button_preferences.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
var newTab = null;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check preferences button existence and functionality");
yield PanelUI.show();
info("Menu panel was opened");
let preferencesButton = document.getElementById("preferences-button");
ok(preferencesButton, "Preferences button exists in Panel Menu");
preferencesButton.click();
--- a/browser/components/customizableui/test/browser_876926_customize_mode_wrapping.js
+++ b/browser/components/customizableui/test/browser_876926_customize_mode_wrapping.js
@@ -150,16 +150,17 @@ function createXULButtonForWindow(win) {
function removeXULButtonForWindow(win) {
win.gNavToolbox.palette.querySelector(`#${kXULWidgetId}`).remove();
}
var otherWin;
// Moving widgets in two windows, one with customize mode and one without, should work.
add_task(function* MoveWidgetsInTwoWindows() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield startCustomizing();
otherWin = yield openAndLoadWindow(null, true);
yield otherWin.PanelUI.ensureReady();
// Create the XUL button to use in the test in both windows.
createXULButtonForWindow(window);
createXULButtonForWindow(otherWin);
ok(CustomizableUI.inDefaultState, "Should start in default state");
--- a/browser/components/customizableui/test/browser_876944_customize_mode_create_destroy.js
+++ b/browser/components/customizableui/test/browser_876944_customize_mode_create_destroy.js
@@ -4,16 +4,17 @@
"use strict";
const kTestWidget1 = "test-customize-mode-create-destroy1";
const kTestWidget2 = "test-customize-mode-create-destroy2";
// Creating and destroying a widget should correctly wrap/unwrap stuff
add_task(function* testWrapUnwrap() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield startCustomizing();
CustomizableUI.createWidget({id: kTestWidget1, label: "Pretty label", tooltiptext: "Pretty tooltip"});
let elem = document.getElementById(kTestWidget1);
let wrapper = document.getElementById("wrapper-" + kTestWidget1);
ok(elem, "There should be an item");
ok(wrapper, "There should be a wrapper");
is(wrapper.firstChild.id, kTestWidget1, "Wrapper should have test widget");
is(wrapper.parentNode.id, "customization-palette", "Wrapper should be in palette");
--- a/browser/components/customizableui/test/browser_878452_drag_to_panel.js
+++ b/browser/components/customizableui/test/browser_878452_drag_to_panel.js
@@ -1,16 +1,17 @@
/* 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/. */
"use strict";
// Dragging an item from the palette to another button in the panel should work.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield startCustomizing();
let btn = document.getElementById("feed-button");
let placements = getAreaWidgetIds(CustomizableUI.AREA_PANEL);
let lastButtonIndex = placements.length - 1;
let lastButton = placements[lastButtonIndex];
let placementsAfterInsert = placements.slice(0, lastButtonIndex).concat(["feed-button", lastButton]);
let lastButtonNode = document.getElementById(lastButton);
--- a/browser/components/customizableui/test/browser_880164_customization_context_menus.js
+++ b/browser/components/customizableui/test/browser_880164_customization_context_menus.js
@@ -6,16 +6,17 @@
requestLongerTimeout(2);
const isOSX = (Services.appinfo.OS === "Darwin");
// Right-click on the home button should
// show a context menu with options to move it.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
let contextMenu = document.getElementById("toolbar-context-menu");
let shownPromise = popupShown(contextMenu);
let homeButton = document.getElementById("home-button");
EventUtils.synthesizeMouse(homeButton, 2, 2, {type: "contextmenu", button: 2 });
yield shownPromise;
let expectedEntries = [
[".customize-context-moveToPanel", true],
--- a/browser/components/customizableui/test/browser_880382_drag_wide_widgets_in_panel.js
+++ b/browser/components/customizableui/test/browser_880382_drag_wide_widgets_in_panel.js
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
requestLongerTimeout(5);
// Dragging the zoom controls to be before the print button should not move any controls.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield startCustomizing();
let zoomControls = document.getElementById("zoom-controls");
let printButton = document.getElementById("print-button");
let placementsAfterMove = ["edit-controls",
"new-window-button",
"privatebrowsing-button",
"save-page-button",
"zoom-controls",
--- a/browser/components/customizableui/test/browser_884402_customize_from_overflow.js
+++ b/browser/components/customizableui/test/browser_884402_customize_from_overflow.js
@@ -8,16 +8,17 @@ var originalWindowWidth;
registerCleanupFunction(function() {
overflowPanel.removeAttribute("animate");
window.resizeTo(originalWindowWidth, window.outerHeight);
});
// Right-click on an item within the overflow panel should
// show a context menu with options to move it.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
overflowPanel.setAttribute("animate", "false");
originalWindowWidth = window.outerWidth;
let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR);
ok(!navbar.hasAttribute("overflowing"), "Should start with a non-overflowing toolbar.");
window.resizeTo(400, window.outerHeight);
--- a/browser/components/customizableui/test/browser_885052_customize_mode_observers_disabed.js
+++ b/browser/components/customizableui/test/browser_885052_customize_mode_observers_disabed.js
@@ -6,16 +6,17 @@
function isFullscreenSizeMode() {
let sizemode = document.documentElement.getAttribute("sizemode");
return sizemode == "fullscreen";
}
// Observers should be disabled when in customization mode.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
// Open and close the panel to make sure that the
// area is generated before getting a child of the area.
let shownPanelPromise = promisePanelShown(window);
PanelUI.toggle({type: "command"});
yield shownPanelPromise;
let hiddenPanelPromise = promisePanelHidden(window);
PanelUI.toggle({type: "command"});
yield hiddenPanelPromise;
--- a/browser/components/customizableui/test/browser_890140_orphaned_placeholders.js
+++ b/browser/components/customizableui/test/browser_890140_orphaned_placeholders.js
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
requestLongerTimeout(2);
// One orphaned item should have two placeholders next to it.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield startCustomizing();
if (isInDevEdition()) {
CustomizableUI.addWidgetToArea("developer-button", CustomizableUI.AREA_PANEL);
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
}
if (!isInDevEdition()) {
ok(CustomizableUI.inDefaultState, "Should be in default state.");
--- a/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
+++ b/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
@@ -11,16 +11,17 @@ function* waitForSearchBarFocus() {
yield waitForCondition(function() {
logActiveElement();
return document.activeElement === searchbar.textbox.inputField;
});
}
// Ctrl+K should open the menu panel and focus the search bar if the search bar is in the panel.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
let searchbar = document.getElementById("searchbar");
gCustomizeMode.addToPanel(searchbar);
let placement = CustomizableUI.getPlacementOfWidget("search-container");
is(placement.area, CustomizableUI.AREA_PANEL, "Should be in panel");
let shownPanelPromise = promisePanelShown(window);
sendWebSearchKeyCommand();
yield shownPanelPromise;
--- a/browser/components/customizableui/test/browser_914863_disabled_help_quit_buttons.js
+++ b/browser/components/customizableui/test/browser_914863_disabled_help_quit_buttons.js
@@ -1,14 +1,15 @@
/* 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/. */
// Entering then exiting customization mode should reenable the Help and Exit buttons.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield startCustomizing();
let helpButton = document.getElementById("PanelUI-help");
let quitButton = document.getElementById("PanelUI-quit");
ok(helpButton.getAttribute("disabled") == "true", "Help button should be disabled while in customization mode.");
ok(quitButton.getAttribute("disabled") == "true", "Quit button should be disabled while in customization mode.");
yield endCustomizing();
ok(!helpButton.hasAttribute("disabled"), "Help button should not be disabled.");
--- a/browser/components/customizableui/test/browser_938995_indefaultstate_nonremovable.js
+++ b/browser/components/customizableui/test/browser_938995_indefaultstate_nonremovable.js
@@ -2,17 +2,19 @@
* 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/. */
"use strict";
const kWidgetId = "test-non-removable-widget";
// Adding non-removable items to a toolbar or the panel shouldn't change inDefaultState
-add_task(function() {
+add_task(async function() {
+ await SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
+ await PanelUI.ensureReady();
ok(CustomizableUI.inDefaultState, "Should start in default state");
let button = createDummyXULButton(kWidgetId, "Test non-removable inDefaultState handling");
CustomizableUI.addWidgetToArea(kWidgetId, CustomizableUI.AREA_NAVBAR);
button.setAttribute("removable", "false");
ok(CustomizableUI.inDefaultState, "Should still be in default state after navbar addition");
button.remove();
--- a/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js
+++ b/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
var button, menuButton;
/* Clicking a button should close the panel */
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
button = document.createElement("toolbarbutton");
button.id = "browser_940307_button";
button.setAttribute("label", "Button");
PanelUI.contents.appendChild(button);
yield PanelUI.show();
let hiddenAgain = promisePanelHidden(window);
EventUtils.synthesizeMouseAtCenter(button, {});
yield hiddenAgain;
--- a/browser/components/customizableui/test/browser_947914_button_addons.js
+++ b/browser/components/customizableui/test/browser_947914_button_addons.js
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var initialLocation = gBrowser.currentURI.spec;
var newTab = null;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check addons button existence and functionality");
yield PanelUI.show();
info("Menu panel was opened");
let addonsButton = document.getElementById("add-ons-button");
ok(addonsButton, "Add-ons button exists in Panel Menu");
addonsButton.click();
--- a/browser/components/customizableui/test/browser_947914_button_copy.js
+++ b/browser/components/customizableui/test/browser_947914_button_copy.js
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var initialLocation = gBrowser.currentURI.spec;
var globalClipboard;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield BrowserTestUtils.withNewTab({gBrowser, url: "about:blank"}, function*() {
info("Check copy button existence and functionality");
let testText = "copy text test";
gURLBar.focus();
info("The URL bar was focused");
yield PanelUI.show();
--- a/browser/components/customizableui/test/browser_947914_button_cut.js
+++ b/browser/components/customizableui/test/browser_947914_button_cut.js
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var initialLocation = gBrowser.currentURI.spec;
var globalClipboard;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield BrowserTestUtils.withNewTab({gBrowser, url: "about:blank"}, function*() {
info("Check cut button existence and functionality");
let testText = "cut text test";
gURLBar.focus();
yield PanelUI.show();
info("Menu panel was opened");
--- a/browser/components/customizableui/test/browser_947914_button_find.js
+++ b/browser/components/customizableui/test/browser_947914_button_find.js
@@ -1,15 +1,16 @@
/* 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/. */
"use strict";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check find button existence and functionality");
yield PanelUI.show();
info("Menu panel was opened");
let findButton = document.getElementById("find-button");
ok(findButton, "Find button exists in Panel Menu");
--- a/browser/components/customizableui/test/browser_947914_button_history.js
+++ b/browser/components/customizableui/test/browser_947914_button_history.js
@@ -1,15 +1,16 @@
/* 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/. */
"use strict";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check history button existence and functionality");
yield PanelUI.show();
info("Menu panel was opened");
let historyButton = document.getElementById("history-panelmenu");
ok(historyButton, "History button appears in Panel Menu");
--- a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
@@ -1,15 +1,16 @@
/* 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/. */
"use strict";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check private browsing button existence and functionality");
yield PanelUI.show();
info("Menu panel was opened");
let windowWasHandled = false;
let privateWindow = null;
--- a/browser/components/customizableui/test/browser_947914_button_newWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newWindow.js
@@ -1,15 +1,16 @@
/* 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/. */
"use strict";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check new window button existence and functionality");
yield PanelUI.show();
info("Menu panel was opened");
let windowWasHandled = false;
let newWindow = null;
let observerWindowOpened = {
--- a/browser/components/customizableui/test/browser_947914_button_paste.js
+++ b/browser/components/customizableui/test/browser_947914_button_paste.js
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var initialLocation = gBrowser.currentURI.spec;
var globalClipboard;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield BrowserTestUtils.withNewTab({gBrowser, url: "about:blank"}, function*() {
info("Check paste button existence and functionality");
let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
globalClipboard = Services.clipboard.kGlobalClipboard;
yield PanelUI.show();
info("Menu panel was opened");
--- a/browser/components/customizableui/test/browser_947914_button_print.js
+++ b/browser/components/customizableui/test/browser_947914_button_print.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
const isOSX = (Services.appinfo.OS === "Darwin");
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield BrowserTestUtils.withNewTab({
gBrowser,
url: "http://example.com/",
}, function* () {
info("Check print button existence and functionality");
yield PanelUI.show();
info("Menu panel was opened");
--- a/browser/components/customizableui/test/browser_947914_button_savePage.js
+++ b/browser/components/customizableui/test/browser_947914_button_savePage.js
@@ -1,15 +1,16 @@
/* 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/. */
"use strict";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check save page button existence");
yield PanelUI.show();
info("Menu panel was opened");
let savePageButton = document.getElementById("save-page-button");
ok(savePageButton, "Save Page button exists in Panel Menu");
--- a/browser/components/customizableui/test/browser_947914_button_zoomIn.js
+++ b/browser/components/customizableui/test/browser_947914_button_zoomIn.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
var initialPageZoom = ZoomManager.zoom;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check zoom in button existence and functionality");
is(initialPageZoom, 1, "Initial zoom factor should be 1");
yield PanelUI.show();
info("Menu panel was opened");
let zoomInButton = document.getElementById("zoom-in-button");
--- a/browser/components/customizableui/test/browser_947914_button_zoomOut.js
+++ b/browser/components/customizableui/test/browser_947914_button_zoomOut.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
var initialPageZoom = ZoomManager.zoom;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check zoom out button existence and functionality");
is(initialPageZoom, 1, "Initial zoom factor should be 1");
yield PanelUI.show();
info("Menu panel was opened");
let zoomOutButton = document.getElementById("zoom-out-button");
--- a/browser/components/customizableui/test/browser_947914_button_zoomReset.js
+++ b/browser/components/customizableui/test/browser_947914_button_zoomReset.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
var initialPageZoom = ZoomManager.zoom;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check zoom reset button existence and functionality");
is(initialPageZoom, 1, "Page zoom reset correctly");
ZoomManager.zoom = 0.5;
yield PanelUI.show();
info("Menu panel was opened");
let zoomResetButton = document.getElementById("zoom-reset-button");
--- a/browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js
+++ b/browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js
@@ -1,15 +1,16 @@
/* 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/. */
"use strict";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
const kNormalLabel = "Character Encoding";
CustomizableUI.addWidgetToArea("characterencoding-button", CustomizableUI.AREA_NAVBAR);
let characterEncoding = document.getElementById("characterencoding-button");
const kOriginalLabel = characterEncoding.getAttribute("label");
characterEncoding.setAttribute("label", "\u00ad" + kNormalLabel);
CustomizableUI.addWidgetToArea("characterencoding-button", CustomizableUI.AREA_PANEL);
yield PanelUI.show();
--- a/browser/components/customizableui/test/browser_967000_button_charEncoding.js
+++ b/browser/components/customizableui/test/browser_967000_button_charEncoding.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
const TEST_PAGE = "http://mochi.test:8888/browser/browser/components/customizableui/test/support/test_967000_charEncoding_page.html";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check Character Encoding button functionality");
// add the Character Encoding button to the panel
CustomizableUI.addWidgetToArea("characterencoding-button",
CustomizableUI.AREA_PANEL);
// check the button's functionality
yield PanelUI.show();
--- a/browser/components/customizableui/test/browser_967000_button_feeds.js
+++ b/browser/components/customizableui/test/browser_967000_button_feeds.js
@@ -6,16 +6,17 @@
const TEST_PAGE = "http://mochi.test:8888/browser/browser/components/customizableui/test/support/feeds_test_page.html";
const TEST_FEED = "http://mochi.test:8888/browser/browser/components/customizableui/test/support/test-feed.xml"
var newTab = null;
var initialLocation = gBrowser.currentURI.spec;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check Subscribe button functionality");
// add the Subscribe button to the panel
CustomizableUI.addWidgetToArea("feed-button",
CustomizableUI.AREA_PANEL);
// check the button's functionality
yield PanelUI.show();
--- a/browser/components/customizableui/test/browser_968447_bookmarks_toolbar_items_in_panel.js
+++ b/browser/components/customizableui/test/browser_968447_bookmarks_toolbar_items_in_panel.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
// Bug 968447 - The Bookmarks Toolbar Items doesn't appear as a
// normal menu panel button in new windows.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
const buttonId = "bookmarks-toolbar-placeholder";
yield startCustomizing();
CustomizableUI.addWidgetToArea("personal-bookmarks", CustomizableUI.AREA_PANEL);
yield endCustomizing();
yield PanelUI.show();
let bookmarksToolbarPlaceholder = document.getElementById(buttonId);
--- a/browser/components/customizableui/test/browser_969661_character_encoding_navbar_disabled.js
+++ b/browser/components/customizableui/test/browser_969661_character_encoding_navbar_disabled.js
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// Adding the character encoding menu to the panel, exiting customize mode,
// and moving it to the nav-bar should have it enabled, not disabled.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
yield startCustomizing();
CustomizableUI.addWidgetToArea("characterencoding-button", "PanelUI-contents");
yield endCustomizing();
yield PanelUI.show();
let panelHiddenPromise = promisePanelHidden(window);
PanelUI.hide();
yield panelHiddenPromise;
CustomizableUI.addWidgetToArea("characterencoding-button", "nav-bar");
--- a/browser/components/customizableui/test/browser_970511_undo_restore_default.js
+++ b/browser/components/customizableui/test/browser_970511_undo_restore_default.js
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
requestLongerTimeout(2);
// Restoring default should reset theme and show an "undo" option which undoes the restoring operation.
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
let homeButtonId = "home-button";
CustomizableUI.removeWidgetFromArea(homeButtonId);
yield startCustomizing();
ok(!CustomizableUI.inDefaultState, "Not in default state to begin with");
is(CustomizableUI.getPlacementOfWidget(homeButtonId), null, "Home button is in palette");
let undoResetButton = document.getElementById("customization-undo-reset-button");
is(undoResetButton.hidden, true, "The undo button is hidden before reset");
--- a/browser/components/customizableui/test/browser_972267_customizationchange_events.js
+++ b/browser/components/customizableui/test/browser_972267_customizationchange_events.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
// Create a new window, then move the home button to the menu and check both windows have
// customizationchange events fire on the toolbox:
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
let newWindow = yield openAndLoadWindow();
let otherToolbox = newWindow.gNavToolbox;
let handlerCalledCount = 0;
let handler = (ev) => {
handlerCalledCount++;
};
--- a/browser/components/customizableui/test/browser_973641_button_addon.js
+++ b/browser/components/customizableui/test/browser_973641_button_addon.js
@@ -3,16 +3,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const kButton = "test_button_for_addon";
var initialLocation = gBrowser.currentURI.spec;
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
+
info("Check addon button functionality");
// create mocked addon button on the navigation bar
let widgetSpec = {
id: kButton,
type: "button",
onClick() {
gBrowser.selectedTab = gBrowser.addTab("about:addons");
--- a/browser/components/customizableui/test/browser_981305_separator_insertion.js
+++ b/browser/components/customizableui/test/browser_981305_separator_insertion.js
@@ -57,16 +57,20 @@ function checkSeparatorInsertion(menuId,
yield panelHiddenPromise;
if (changedPlacement) {
CustomizableUI.reset();
}
};
}
+add_task(async function () {
+ await SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
+});
+
add_task(checkSeparatorInsertion("menuWebDeveloperPopup", "developer-button", "PanelUI-developerItems"));
add_task(checkSeparatorInsertion("viewSidebarMenu", "sidebar-button", "PanelUI-sidebarItems"));
registerCleanupFunction(function() {
for (let el of tempElements) {
el.remove();
}
tempElements = null;
--- a/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js
+++ b/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
const kWidgetId = "test-981418-widget-onbeforecreated";
// Should be able to add broken view widget
add_task(function* testAddOnBeforeCreatedWidget() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
let viewShownDeferred = Promise.defer();
let onBeforeCreatedCalled = false;
let widgetSpec = {
id: kWidgetId,
type: "view",
viewId: kWidgetId + "idontexistyet",
onBeforeCreated(doc) {
let view = doc.createElement("panelview");
--- a/browser/components/customizableui/test/browser_984455_bookmarks_items_reparenting.js
+++ b/browser/components/customizableui/test/browser_984455_bookmarks_items_reparenting.js
@@ -185,16 +185,17 @@ function checkNotOverflowing(aID) {
"Item with ID " + aID + " should not have overflowedItem attribute");
}
/**
* Test that overflowing the bookmarks menu button doesn't break the
* context menus for the Unsorted and Bookmarks Toolbar menu items.
*/
add_task(function* testOverflowingBookmarksButtonContextMenu() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
ok(!gNavBar.hasAttribute("overflowing"), "Should start with a non-overflowing toolbar.");
ok(CustomizableUI.inDefaultState, "Should start in default state.");
// Open the Unsorted and Bookmarks Toolbar context menus and ensure
// that they have views attached.
yield checkSpecialContextMenus();
yield overflowEverything();
--- a/browser/components/customizableui/test/browser_987640_charEncoding.js
+++ b/browser/components/customizableui/test/browser_987640_charEncoding.js
@@ -2,16 +2,17 @@
* 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/. */
"use strict";
const TEST_PAGE = "http://mochi.test:8888/browser/browser/components/customizableui/test/support/test_967000_charEncoding_page.html";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Check Character Encoding panel functionality");
// add the Character Encoding button to the panel
CustomizableUI.addWidgetToArea("characterencoding-button",
CustomizableUI.AREA_PANEL);
let newTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE, true, true);
--- a/browser/components/customizableui/test/browser_989751_subviewbutton_class.js
+++ b/browser/components/customizableui/test/browser_989751_subviewbutton_class.js
@@ -47,16 +47,19 @@ function checkSubviewButtonClass(menuId,
PanelUI.hide();
yield panelHiddenPromise;
if (changedPlacement) {
CustomizableUI.reset();
}
};
}
+add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
+});
add_task(checkSubviewButtonClass("menuWebDeveloperPopup", "developer-button", "PanelUI-developerItems"));
add_task(checkSubviewButtonClass("viewSidebarMenu", "sidebar-button", "PanelUI-sidebarItems"));
registerCleanupFunction(function() {
tempElement.classList.remove(kCustomClass)
tempElement = null;
});
--- a/browser/components/customizableui/test/browser_customizemode_contextmenu_menubuttonstate.js
+++ b/browser/components/customizableui/test/browser_customizemode_contextmenu_menubuttonstate.js
@@ -1,11 +1,12 @@
"use strict";
add_task(function*() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
ok(!PanelUI.menuButton.hasAttribute("open"), "Menu button should not be 'pressed' outside customize mode");
yield startCustomizing();
is(PanelUI.menuButton.getAttribute("open"), "true", "Menu button should be 'pressed' when in customize mode");
let contextMenu = document.getElementById("customizationPanelItemContextMenu");
let shownPromise = popupShown(contextMenu);
let newWindowButton = document.getElementById("wrapper-new-window-button");
--- a/browser/components/customizableui/test/browser_remote_tabs_button.js
+++ b/browser/components/customizableui/test/browser_remote_tabs_button.js
@@ -10,16 +10,17 @@ const service = syncService.Service;
Components.utils.import("resource://services-sync/UIState.jsm");
let getState;
let originalSync;
let syncWasCalled = false;
// TODO: This test should probably be re-written, we don't really test much here.
add_task(async function testSyncRemoteTabsButtonFunctionality() {
+ await SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
info("Test the Sync Remote Tabs button in the PanelUI");
storeInitialValues();
mockFunctions();
// Force UI update.
Services.obs.notifyObservers(null, UIState.ON_UPDATE);
// add the sync remote tabs button to the panel
--- a/browser/components/customizableui/test/browser_synced_tabs_menu.js
+++ b/browser/components/customizableui/test/browser_synced_tabs_menu.js
@@ -34,16 +34,17 @@ let mockedInternal = {
get isConfiguredToSyncTabs() { return true; },
getTabClients() { return Promise.resolve([]); },
syncTabs() { return Promise.resolve(); },
hasSyncedThisSession: false,
};
add_task(function* setup() {
+ yield SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]});
let oldInternal = SyncedTabs._internal;
SyncedTabs._internal = mockedInternal;
// This test hacks some observer states to simulate a user being signed
// in to Sync - restore them when the test completes.
let initialObserverStates = {};
for (let id of ["sync-reauth-state", "sync-setup-state", "sync-syncnow-state"]) {
initialObserverStates[id] = document.getElementById(id).hidden;