summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/favicons/browser_subframe_favicons_not_used.js
blob: 9bf28e75fa5a65cb01fe574738e9842b5757237f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Make sure <link rel="..."> isn't respected in sub-frames. */

add_task(async function() {
  const ROOT =
    "http://mochi.test:8888/browser/browser/base/content/test/favicons/";
  const URL = ROOT + "file_bug970276_popup1.html";

  let promiseIcon = waitForFaviconMessage(
    true,
    ROOT + "file_bug970276_favicon1.ico"
  );
  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, URL);
  let icon = await promiseIcon;

  Assert.equal(
    icon.iconURL,
    ROOT + "file_bug970276_favicon1.ico",
    "The expected icon has been set"
  );

  BrowserTestUtils.removeTab(tab);
});