From 035c4e79875898d3c69b005a0328c60407425be9 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Wed, 1 Aug 2012 12:02:48 -0700 Subject: [PATCH] Bug 777989 - Make Add-on sync TPS tests work again; r=rnewman --- services/sync/modules/addonutils.js | 2 ++ services/sync/services-sync.js | 1 + services/sync/tps/extensions/tps/modules/addons.jsm | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/sync/modules/addonutils.js b/services/sync/modules/addonutils.js index a6625d599b83..ea693a20fa68 100644 --- a/services/sync/modules/addonutils.js +++ b/services/sync/modules/addonutils.js @@ -10,6 +10,7 @@ const {interfaces: Ci, utils: Cu} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://services-common/log4moz.js"); +Cu.import("resource://services-sync/util.js"); XPCOMUtils.defineLazyModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm"); @@ -18,6 +19,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "AddonRepository", function AddonUtilsInternal() { this._log = Log4Moz.repository.getLogger("Sync.AddonUtils"); + this._log.Level = Log4Moz.Level[Svc.Prefs.get("log.logger.addonutils")]; } AddonUtilsInternal.prototype = { /** diff --git a/services/sync/services-sync.js b/services/sync/services-sync.js index 80b1edbc5649..da8a152d6bab 100644 --- a/services/sync/services-sync.js +++ b/services/sync/services-sync.js @@ -54,6 +54,7 @@ pref("services.sync.log.appender.file.logOnError", true); pref("services.sync.log.appender.file.logOnSuccess", false); pref("services.sync.log.appender.file.maxErrorAge", 864000); // 10 days pref("services.sync.log.rootLogger", "Debug"); +pref("services.sync.log.logger.addonutils", "Debug"); pref("services.sync.log.logger.service.main", "Debug"); pref("services.sync.log.logger.status", "Debug"); pref("services.sync.log.logger.authenticator", "Debug"); diff --git a/services/sync/tps/extensions/tps/modules/addons.jsm b/services/sync/tps/extensions/tps/modules/addons.jsm index 24d4fa86b938..69cc43c17055 100644 --- a/services/sync/tps/extensions/tps/modules/addons.jsm +++ b/services/sync/tps/extensions/tps/modules/addons.jsm @@ -96,7 +96,7 @@ Addon.prototype = { // for the addon's install .xml; we'll read the actual id from the .xml. let cb = Async.makeSpinningCallback(); - AddonUtils.installAddons([{id: this.id}], cb); + AddonUtils.installAddons([{id: this.id, requireSecureURI: false}], cb); let result = cb.wait(); Logger.AssertEqual(1, result.installedIDs.length, "Exactly 1 add-on was installed.");