Merge latest green birch changeset and mozilla-central

This commit is contained in:
Ed Morley 2013-05-28 16:27:45 +01:00
commit b86e4b79f8
4 changed files with 26 additions and 16 deletions

View File

@ -30,6 +30,7 @@ _BROWSER_FILES = \
browser_newtab_bug735987.js \
browser_newtab_bug752841.js \
browser_newtab_bug765628.js \
browser_newtab_bug876313.js \
browser_newtab_perwindow_private_browsing.js \
head.js \
$(NULL)

View File

@ -0,0 +1,24 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/*
* This test makes sure that the changes made by unpinning
* a site are actually written to NewTabUtils' storage.
*/
function runTests() {
// Second cell is pinned with page #99.
yield setLinks("0,1,2,3,4,5,6,7,8");
setPinnedLinks(",99");
yield addNewTabPageTab();
checkGrid("0,99p,1,2,3,4,5,6,7");
// Unpin the second cell's site.
yield unpinCell(1);
checkGrid("0,1,2,3,4,5,6,7,8");
// Clear the pinned cache to force NewTabUtils to read the pref again.
NewTabUtils.pinnedLinks.resetCache();
NewTabUtils.allPages.update();
checkGrid("0,1,2,3,4,5,6,7,8");
}

View File

@ -356,9 +356,6 @@ let SessionStoreInternal = {
this._initPrefs();
// Do pref migration before we store any values and start observing changes
this._migratePrefs();
this._disabledForMultiProcess = this._prefBranch.getBoolPref("tabs.remote");
// this pref is only read at startup, so no need to observe it
@ -551,19 +548,6 @@ let SessionStoreInternal = {
}
},
_migratePrefs: function ssi_migratePrefs() {
// Added For Firefox 8
// max_concurrent_tabs is going away. We're going to hard code a max value
// (MAX_CONCURRENT_TAB_RESTORES) and start using a boolean pref restore_on_demand.
if (this._prefBranch.prefHasUserValue("sessionstore.max_concurrent_tabs") &&
!this._prefBranch.prefHasUserValue("sessionstore.restore_on_demand")) {
let maxConcurrentTabs =
this._prefBranch.getIntPref("sessionstore.max_concurrent_tabs");
this._prefBranch.setBoolPref("sessionstore.restore_on_demand", maxConcurrentTabs == 0);
this._prefBranch.clearUserPref("sessionstore.max_concurrent_tabs");
}
},
/**
* Handle notifications
*/

View File

@ -415,6 +415,7 @@ let PinnedLinks = {
while (i >= 0 && links[i] == null)
i--;
links.splice(i +1);
this.save();
},
/**