mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 886263 - Make places be enabled by default in all xpcshell-tests to avoid having to set it in lots of places (so that tests work with apps where places is disabled by default). r=mak
This commit is contained in:
parent
dee2df83d6
commit
8e11fc7cb0
@ -61,8 +61,6 @@ function run_test()
|
||||
// Needed to properly setup and shutdown the profile.
|
||||
do_get_profile();
|
||||
|
||||
Services.prefs.setBoolPref("places.history.enabled", true);
|
||||
|
||||
for (var i = 0; i < tests.length; i++)
|
||||
tests[i]();
|
||||
|
||||
|
@ -45,6 +45,17 @@ try {
|
||||
}
|
||||
catch (e) { }
|
||||
|
||||
// Only if building of places is enabled.
|
||||
if (runningInParent &&
|
||||
"mozIAsyncHistory" in Components.interfaces) {
|
||||
// Ensure places history is enabled for xpcshell-tests as some non-FF
|
||||
// apps disable it.
|
||||
let (prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch)) {
|
||||
prefs.setBoolPref("places.history.enabled", true);
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
if (runningInParent) {
|
||||
let prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
|
@ -36,9 +36,6 @@ add_task(function test_execute()
|
||||
if (!("@mozilla.org/browser/nav-history-service;1" in Cc))
|
||||
return;
|
||||
|
||||
// Ensure places is enabled.
|
||||
Services.prefs.setBoolPref("places.history.enabled", true);
|
||||
|
||||
let dm = Cc["@mozilla.org/download-manager;1"].
|
||||
getService(Ci.nsIDownloadManager);
|
||||
let db = dm.DBConnection;
|
||||
|
@ -55,9 +55,6 @@ function LOG(aMsg) {
|
||||
|
||||
let gTestDir = do_get_cwd();
|
||||
|
||||
// Ensure history is enabled.
|
||||
Services.prefs.setBoolPref("places.history.enabled", true);
|
||||
|
||||
// Initialize profile.
|
||||
let gProfD = do_get_profile();
|
||||
|
||||
|
@ -6,9 +6,6 @@ const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
// Ensure history is enabled.
|
||||
Services.prefs.setBoolPref("places.history.enabled", true);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
|
||||
"resource://gre/modules/commonjs/sdk/core/promise.js");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
|
@ -733,8 +733,6 @@ let tests = [
|
||||
|
||||
function run_test()
|
||||
{
|
||||
Services.prefs.setBoolPref("places.history.enabled", true);
|
||||
|
||||
for (let i = 0; i < tests.length; i++)
|
||||
add_task(tests[i]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user