Bug 1095128 - Make sure add-on updates remain disabled after each browser chrome test. r=Unfocused, a=test-only
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 18 Nov 2014 09:18:51 -0800
changeset 233986 f86e6af6c3ac3e6ed25f15dbee1b2617e95c4755
parent 233985 104d3f5ce7c905e03fffa7041fd151d38246d71a
child 233987 90ab630dca0f9c070e1f6b0c8c6c5dfaaff953e8
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersUnfocused, test-only
bugs1095128
milestone35.0a2
Bug 1095128 - Make sure add-on updates remain disabled after each browser chrome test. r=Unfocused, a=test-only
toolkit/mozapps/extensions/test/browser/browser_bug586574.js
toolkit/mozapps/extensions/test/browser/head.js
--- a/toolkit/mozapps/extensions/test/browser/browser_bug586574.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug586574.js
@@ -16,25 +16,20 @@ var gProvider;
 
 var gUtilsBtn;
 var gUtilsMenu;
 var gDropdownMenu;
 var gSetDefault;
 var gResetToAutomatic;
 var gResetToManual;
 
-// Remember and restore preferences for this test, and make sure
-// we don't accidentally start a background update while the prefs
+// Make sure we don't accidentally start a background update while the prefs
 // are enabled.
 disableBackgroundUpdateTimer();
-var updatesEnabled = Services.prefs.getBoolPref(PREF_UPDATE_ENABLED);
-var autoDefault = Services.prefs.getBoolPref(PREF_AUTOUPDATE_DEFAULT);
 registerCleanupFunction(() => {
-  Services.prefs.setBoolPref(PREF_UPDATE_ENABLED, updatesEnabled);
-  Services.prefs.setBoolPref(PREF_AUTOUPDATE_DEFAULT, autoDefault);
   enableBackgroundUpdateTimer();
 });
 
 function test() {
   waitForExplicitFinish();
 
   gProvider = new MockProvider();
 
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -60,16 +60,18 @@ var gTestsRun = 0;
 var gTestStart = null;
 
 var gUseInContentUI = !gTestInWindow && ("switchToTabHavingURI" in window);
 
 var gRestorePrefs = [{name: PREF_LOGGING_ENABLED},
                      {name: "extensions.webservice.discoverURL"},
                      {name: "extensions.update.url"},
                      {name: "extensions.update.background.url"},
+                     {name: "extensions.update.enabled"},
+                     {name: "extensions.update.autoUpdateDefault"},
                      {name: "extensions.getAddons.get.url"},
                      {name: "extensions.getAddons.getWithPerformance.url"},
                      {name: "extensions.getAddons.search.browseURL"},
                      {name: "extensions.getAddons.search.url"},
                      {name: "extensions.getAddons.cache.enabled"},
                      {name: "devtools.chrome.enabled"},
                      {name: "devtools.debugger.remote-enabled"},
                      {name: PREF_SEARCH_MAXRESULTS},