mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge m-c to fx-team
This commit is contained in:
commit
456925f942
@ -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)
|
||||
|
24
browser/base/content/test/newtab/browser_newtab_bug876313.js
Normal file
24
browser/base/content/test/newtab/browser_newtab_bug876313.js
Normal 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");
|
||||
}
|
@ -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
|
||||
*/
|
||||
|
@ -415,6 +415,7 @@ let PinnedLinks = {
|
||||
while (i >= 0 && links[i] == null)
|
||||
i--;
|
||||
links.splice(i +1);
|
||||
this.save();
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user