Bug 1378194 - ordering of buttons in browser_ext_themes_icons.js matters; don't append bookmarks menu button at the end, r?jaws
MozReview-Commit-ID: 8WOsV4u9DJY
--- a/browser/components/extensions/test/browser/browser_ext_themes_icons.js
+++ b/browser/components/extensions/test/browser/browser_ext_themes_icons.js
@@ -135,22 +135,24 @@ async function runTestWithIcons(icons) {
["sidebars", "#sidebar-button", "sidebar-button"],
["share_page", "#social-share-button", "social-share-button"],
["subscribe", "#feed-button", "feed-button"],
["text_encoding", "#characterencoding-button", "characterencoding-button"],
["email_link", "#email-link-button", "email-link-button"],
["forget", "#panic-button", "panic-button"],
["pocket", "#pocket-button", "pocket-button"],
];
+ // We add these at the beginning because adding them at the end can end up
+ // putting them in the overflow panel, where they aren't displayed the same way.
if (AppConstants.MOZ_PHOTON_THEME) {
- ICON_INFO.push(["bookmark_star", "#star-button"]);
- ICON_INFO.push(["bookmark_menu", "#bookmarks-menu-button", "bookmarks-menu-button"]);
+ ICON_INFO.unshift(["bookmark_star", "#star-button"]);
+ ICON_INFO.unshift(["bookmark_menu", "#bookmarks-menu-button", "bookmarks-menu-button"]);
} else {
- ICON_INFO.push(["bookmark_star", "#bookmarks-menu-button", "bookmarks-menu-button"]);
- ICON_INFO.push(["bookmark_menu", "#bookmarks-menu-button > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon"]);
+ ICON_INFO.unshift(["bookmark_star", "#bookmarks-menu-button", "bookmarks-menu-button"]);
+ ICON_INFO.unshift(["bookmark_menu", "#bookmarks-menu-button > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon"]);
}
window.maximize();
for (let button of ICON_INFO) {
if (button[2]) {
CustomizableUI.addWidgetToArea(button[2], CustomizableUI.AREA_NAVBAR);
}