mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 17:20:54 +00:00
Bug 1551239 - Keep tab icon when reloading Customize Mode tab. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D100784
This commit is contained in:
parent
8521ee6581
commit
8e5c5588b8
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user