summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/favicons/browser_redirect.js
blob: ea2b053be7d95891b640303815a065a8e25f84be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const ROOT =
  "http://mochi.test:8888/browser/browser/base/content/test/favicons/";

add_task(async () => {
  const URL = ROOT + "file_favicon_redirect.html";
  const EXPECTED_ICON = ROOT + "file_favicon_redirect.ico";

  let promise = waitForFaviconMessage(true, EXPECTED_ICON);

  const tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, URL);
  let tabIcon = await promise;

  is(
    tabIcon.iconURL,
    EXPECTED_ICON,
    "should use the redirected icon for the tab"
  );

  BrowserTestUtils.removeTab(tab);
});