commit 299b11d6822eec6b7271950b0796d022c4226dde Author: Robert Strong robert.bugzilla@gmail.com Date: Mon Jul 7 12:49:21 2014 -0700
Bug 1027287 - Prevent non-local network connection to aus when enabling app update in add-ons mgr hotfix test. r=mossop, a=test-only
--HG-- extra : rebase_source : 594235cd317b0261e436da3ac5ab8166a754df8a --- toolkit/mozapps/extensions/test/browser/browser_hotfix.js | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/toolkit/mozapps/extensions/test/browser/browser_hotfix.js b/toolkit/mozapps/extensions/test/browser/browser_hotfix.js index ff28889..80f9240 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_hotfix.js +++ b/toolkit/mozapps/extensions/test/browser/browser_hotfix.js @@ -12,6 +12,7 @@ const PREF_INSTALL_REQUIREBUILTINCERTS = "extensions.install.requireBuiltInCerts const PREF_UPDATE_REQUIREBUILTINCERTS = "extensions.update.requireBuiltInCerts";
const PREF_APP_UPDATE_ENABLED = "app.update.enabled"; +const PREF_APP_UPDATE_URL = "app.update.url";
const HOTFIX_ID = "hotfix@tests.mozilla.org";
@@ -60,6 +61,8 @@ var FailedInstallListener = { function test() { waitForExplicitFinish();
+ var oldAusUrl = Services.prefs.getDefaultBranch(null).getCharPref(PREF_APP_UPDATE_URL); + Services.prefs.getDefaultBranch(null).setCharPref(PREF_APP_UPDATE_URL, TESTROOT + "ausdummy.xml"); Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, true); Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false); Services.prefs.setBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, false); @@ -69,6 +72,7 @@ function test() {
registerCleanupFunction(function() { Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, false); + Services.prefs.getDefaultBranch(null).setCharPref(PREF_APP_UPDATE_URL, oldAusUrl); Services.prefs.clearUserPref(PREF_EM_HOTFIX_ID); Services.prefs.setCharPref(PREF_EM_HOTFIX_URL, oldURL); Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS);