1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/base/content/test/general/browser_bug550565.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,21 @@ 1.4 +function test() { 1.5 + waitForExplicitFinish(); 1.6 + 1.7 + let testPath = getRootDirectory(gTestPath); 1.8 + 1.9 + let tab = gBrowser.addTab(testPath + "file_bug550565_popup.html"); 1.10 + 1.11 + tab.linkedBrowser.addEventListener("DOMContentLoaded", function() { 1.12 + tab.linkedBrowser.removeEventListener("DOMContentLoaded", arguments.callee, true); 1.13 + 1.14 + let expectedIcon = testPath + "file_bug550565_favicon.ico"; 1.15 + 1.16 + is(gBrowser.getIcon(tab), expectedIcon, "Correct icon before pushState."); 1.17 + tab.linkedBrowser.contentWindow.history.pushState("page2", "page2", "page2"); 1.18 + is(gBrowser.getIcon(tab), expectedIcon, "Correct icon after pushState."); 1.19 + 1.20 + gBrowser.removeTab(tab); 1.21 + 1.22 + finish(); 1.23 + }, true); 1.24 +}