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

function test() {
  waitForExplicitFinish();

  let testPath = getRootDirectory(gTestPath);

  let tab = gBrowser.addTab(testPath + "file_bug970276_popup1.html");

  tab.linkedBrowser.addEventListener("load", function() {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    let expectedIcon = testPath + "file_bug970276_favicon1.ico";
    is(gBrowser.getIcon(tab), expectedIcon, "Correct icon.");

    gBrowser.removeTab(tab);

    finish();
  }, true);
}