diff --git a/browser/base/content/tabbrowser.js b/browser/base/content/tabbrowser.js index 3c25a0389c34..b7e0f7d16ea6 100644 --- a/browser/base/content/tabbrowser.js +++ b/browser/base/content/tabbrowser.js @@ -6202,10 +6202,13 @@ // Don't clear the favicon if this tab is in the pending // state, as SessionStore will have set the icon for us even // though we're pointed at an about:blank. Also don't clear it + // if the tab is in customize mode, to keep the one set by + // gCustomizeMode.setTab (bug 1551239). Also don't clear it // if onLocationChange was triggered by a pushState or a // replaceState (bug 550565) or a hash change (bug 408415). if ( !this.mTab.hasAttribute("pending") && + !this.mTab.hasAttribute("customizemode") && aWebProgress.isLoadingDocument ) { // Removing the tab's image here causes flickering, wait until the diff --git a/browser/components/customizableui/test/browser_reload_tab.js b/browser/components/customizableui/test/browser_reload_tab.js index 6577984964cc..b12f5ee0e9b2 100644 --- a/browser/components/customizableui/test/browser_reload_tab.js +++ b/browser/components/customizableui/test/browser_reload_tab.js @@ -43,6 +43,11 @@ add_task(async function reload_tab() { gBrowser.reloadTab(customizeTab); await tabReloaded; + is( + gBrowser.getIcon(customizeTab), + "chrome://browser/skin/customize.svg", + "Tab should have customize icon" + ); is( customizeTab.getAttribute("customizemode"), "true", @@ -71,6 +76,11 @@ add_task(async function reload_tab() { await BrowserTestUtils.switchTab(gBrowser, customizeTab); await customizePromise; + is( + gBrowser.getIcon(customizeTab), + "chrome://browser/skin/customize.svg", + "Tab should still have customize icon" + ); is( customizeTab.getAttribute("customizemode"), "true",