зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1483910: Clear seenTabIcon on pagehide so subsequent loads attempt to load the root favicon. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D3534 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0ba415cc98
Коммит
35b08ddffc
|
@ -78,6 +78,8 @@ class LinkHandlerChild extends ActorChild {
|
|||
if (this._iconLoader) {
|
||||
this._iconLoader.onPageHide();
|
||||
}
|
||||
|
||||
this.seenTabIcon = false;
|
||||
}
|
||||
|
||||
onLinkEvent(event) {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
</html>
|
||||
|
|
|
@ -48,3 +48,6 @@ support-files =
|
|||
file_favicon_redirect.html
|
||||
file_favicon_redirect.ico
|
||||
file_favicon_redirect.ico^headers^
|
||||
[browser_rooticon.js]
|
||||
support-files =
|
||||
blank.html
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
add_task(async () => {
|
||||
const testPath = "http://example.com/browser/browser/base/content/test/favicons/blank.html";
|
||||
const expectedIcon = "http://example.com/favicon.ico";
|
||||
|
||||
let tab = BrowserTestUtils.addTab(gBrowser, testPath);
|
||||
gBrowser.selectedTab = tab;
|
||||
let browser = tab.linkedBrowser;
|
||||
|
||||
let faviconPromise = waitForLinkAvailable(browser);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
let iconURI = await faviconPromise;
|
||||
is(iconURI, expectedIcon, "Got correct initial icon.");
|
||||
|
||||
faviconPromise = waitForLinkAvailable(browser);
|
||||
BrowserTestUtils.loadURI(browser, testPath);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
iconURI = await faviconPromise;
|
||||
is(iconURI, expectedIcon, "Got correct icon on second load.");
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
});
|
Загрузка…
Ссылка в новой задаче