mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 892875 - Put background thumbnails behind a preference, and disable that preference during tests. r=adw
This commit is contained in:
parent
f5ba067d22
commit
09868257b8
@ -144,3 +144,7 @@ user_pref("media.webaudio.legacy.OscillatorNode", true);
|
||||
// Always use network provider for geolocation tests
|
||||
// so we bypass the OSX dialog raised by the corelocation provider
|
||||
user_pref("geo.provider.testing", true);
|
||||
|
||||
// Background thumbnails in particular cause grief, and disabling thumbnails
|
||||
// in general can't hurt - we re-enable them when tests need them.
|
||||
user_pref("browser.pageThumbs.enabled", false);
|
||||
|
@ -46,6 +46,11 @@ const BackgroundPageThumbs = {
|
||||
* the queue and started. Defaults to 30000 (30 seconds).
|
||||
*/
|
||||
capture: function (url, options={}) {
|
||||
if (!PageThumbs._prefEnabled()) {
|
||||
if (options.onDone)
|
||||
schedule(() => options.onDone(null));
|
||||
return;
|
||||
}
|
||||
this._captureQueue = this._captureQueue || [];
|
||||
this._capturesByURL = this._capturesByURL || new Map();
|
||||
|
||||
|
@ -10,9 +10,13 @@ let {PageThumbs, PageThumbsStorage, SessionStore, FileUtils, OS} = tmp;
|
||||
|
||||
Cu.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
|
||||
let oldEnabledPref = Services.prefs.getBoolPref("browser.pageThumbs.enabled");
|
||||
Services.prefs.setBoolPref("browser.pageThumbs.enabled", true);
|
||||
|
||||
registerCleanupFunction(function () {
|
||||
while (gBrowser.tabs.length > 1)
|
||||
gBrowser.removeTab(gBrowser.tabs[1]);
|
||||
Services.prefs.setBoolPref("browser.pageThumbs.enabled", oldEnabledPref)
|
||||
});
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user