summaryrefslogtreecommitdiff
path: root/browser/base/content/test/browser_bug550565.js
blob: 0dfa4ed4a6467c37c76be0386afbd7b7999913b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function test() {
  waitForExplicitFinish();

  let testPath = getRootDirectory(gTestPath);

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

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

    let expectedIcon = testPath + "file_bug550565_favicon.ico";

    is(gBrowser.getIcon(tab), expectedIcon, "Correct icon before pushState.");
    tab.linkedBrowser.contentWindow.history.pushState("page2", "page2", "page2");
    is(gBrowser.getIcon(tab), expectedIcon, "Correct icon after pushState.");

    gBrowser.removeTab(tab);

    finish();
  }, true);
}