Bug 1059600 - Set the URI as the initial tab label for javascript links opened in new tabs. r=gijs

--HG--
extra : rebase_source : 3a28661f42daa9ec6243234d9d1eaf8b01055e32
This commit is contained in:
Dão Gottwald 2014-12-05 09:42:56 -08:00
parent 79e9a5b3bb
commit 1bb48df2e6
2 changed files with 4 additions and 1 deletions

View File

@ -1659,6 +1659,9 @@
// allows the TabLabelModified event to be properly dispatched.
if (!aURI || isBlankPageURL(aURI)) {
t.label = this.mStringBundle.getString("tabs.emptyTabTitle");
} else if (aURI.toLowerCase().startsWith("javascript:")) {
// This can go away when bug 672618 or bug 55696 are fixed.
t.label = aURI;
}
this.tabContainer.updateVisibility();

View File

@ -121,7 +121,7 @@ function setUpTest(aTestName, aIDForNextTest, aFuncForNextTest, aChildTabLink) {
mainTab = gTestWin.gBrowser.selectedTab;
// get the link for the next test from the main page
let target = gTestWin.content.document.getElementById(aIDForNextTest);
let target = gTestWin.content.document.getElementById(aIDForNextTest).href;
gTestWin.gBrowser.addTab(target);
gTestWin.gBrowser.selectTabAtIndex(1);
waitForSomeTabToLoad(checkPopUpNotification);