test code for Bug 1315506 - Remove app.update.url.override preference. r=mhowell
authorRobert Strong <robert.bugzilla@gmail.com>
Fri, 11 Nov 2016 12:58:42 -0800
changeset 352342 993e106e331fc0a212e2c98837c21d35d6cb6614
parent 352341 b333ba0fdd87463f9cc8bece66faf1c22c4c0716
child 352343 355cce73963e81b06fc2e51b4981bc072709c6a1
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhowell
bugs1315506
milestone52.0a1
test code for Bug 1315506 - Remove app.update.url.override preference. r=mhowell
layout/tools/reftest/runreftestb2g.py
layout/tools/reftest/runreftestmulet.py
toolkit/mozapps/update/tests/chrome/test_0010_background_basic.xul
toolkit/mozapps/update/tests/chrome/test_0011_check_basic.xul
toolkit/mozapps/update/tests/chrome/test_0012_check_basic_staging.xul
toolkit/mozapps/update/tests/chrome/test_0013_check_no_updates.xul
toolkit/mozapps/update/tests/chrome/test_0014_check_error_xml_malformed.xul
toolkit/mozapps/update/tests/chrome/test_0061_check_verifyFailPartial_noComplete.xul
toolkit/mozapps/update/tests/chrome/test_0062_check_verifyFailComplete_noPartial.xul
toolkit/mozapps/update/tests/chrome/test_0063_check_verifyFailPartialComplete.xul
toolkit/mozapps/update/tests/chrome/test_0064_check_verifyFailPartial_successComplete.xul
toolkit/mozapps/update/tests/chrome/test_0101_background_restartNotification.xul
toolkit/mozapps/update/tests/chrome/test_0102_background_restartNotification_staging.xul
toolkit/mozapps/update/tests/chrome/test_0103_background_restartNotification_stagingService.xul
toolkit/mozapps/update/tests/chrome/test_0111_neverButton_basic.xul
toolkit/mozapps/update/tests/chrome/test_0113_showNeverForVersionRemovedWithPref.xul
toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul
toolkit/mozapps/update/tests/chrome/test_0152_notify_backgroundCheckOfflineRetry.xul
toolkit/mozapps/update/tests/chrome/test_0161_check_unsupported.xul
toolkit/mozapps/update/tests/chrome/test_0162_notify_unsupported.xul
toolkit/mozapps/update/tests/chrome/test_0171_check_noPerms_manual.xul
toolkit/mozapps/update/tests/chrome/test_0172_notify_noPerms_manual.xul
toolkit/mozapps/update/tests/chrome/utils.js
toolkit/mozapps/update/tests/data/shared.js
toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js
toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js
toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js
toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
toolkit/mozapps/update/tests/unit_aus_update/urlConstruction.js
--- a/layout/tools/reftest/runreftestb2g.py
+++ b/layout/tools/reftest/runreftestb2g.py
@@ -249,17 +249,16 @@ class B2GRemoteReftest(RefTest):
         prefs["font.size.inflation.minTwips"] = 0
         prefs["network.dns.localDomains"] = "app://test-container.gaiamobile.org"
         prefs["reftest.browser.iframe.enabled"] = False
         prefs["reftest.remote"] = True
 
         # Make sure we disable system updates
         prefs["app.update.enabled"] = False
         prefs["app.update.url"] = ""
-        prefs["app.update.url.override"] = ""
         # Disable webapp updates
         prefs["webapps.update.enabled"] = False
         # Disable tiles also
         prefs["browser.newtabpage.directory.source"] = ""
         prefs["browser.newtabpage.directory.ping"] = ""
 
         # Set the extra prefs.
         profile.set_preferences(prefs)
--- a/layout/tools/reftest/runreftestmulet.py
+++ b/layout/tools/reftest/runreftestmulet.py
@@ -121,17 +121,16 @@ class MuletReftest(RefTest):
             # FIXME: With Mulet we can't set this values since Gaia won't launch
             prefs["b2g.system_startup_url"] = \
                     "app://test-container.gaiamobile.org/index.html"
             prefs["b2g.system_manifest_url"] = \
                     "app://test-container.gaiamobile.org/manifest.webapp"
         # Make sure we disable system updates
         prefs["app.update.enabled"] = False
         prefs["app.update.url"] = ""
-        prefs["app.update.url.override"] = ""
         # Disable webapp updates
         prefs["webapps.update.enabled"] = False
         # Disable tiles also
         prefs["browser.newtabpage.directory.source"] = ""
         prefs["browser.newtabpage.directory.ping"] = ""
         prefs["dom.ipc.tabs.disabled"] = False
         prefs["dom.mozBrowserFramesEnabled"] = True
         prefs["font.size.inflation.emPerLine"] = 0
--- a/toolkit/mozapps/update/tests/chrome/test_0010_background_basic.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0010_background_basic.xul
@@ -29,17 +29,17 @@ const TESTS = [ {
   buttonClick: "extra1"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
             getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gAUS.checkForBackgroundUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0011_check_basic.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0011_check_basic.xul
@@ -30,17 +30,17 @@ const TESTS = [ {
   pageid: PAGEID_FINISHED,
   buttonClick: "extra1"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0012_check_basic_staging.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0012_check_basic_staging.xul
@@ -34,17 +34,17 @@ const TESTS = [ {
 gUseTestUpdater = true;
 
 function runTest() {
   debugDump("entering");
 
   Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0013_check_no_updates.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0013_check_no_updates.xul
@@ -25,17 +25,17 @@ const TESTS = [ {
   pageid: PAGEID_NO_UPDATES_FOUND,
   buttonClick: "finish"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?noUpdates=1";
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0014_check_error_xml_malformed.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0014_check_error_xml_malformed.xul
@@ -25,17 +25,17 @@ const TESTS = [ {
   pageid: PAGEID_ERRORS,
   buttonClick: "finish"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?xmlMalformed=1";
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0061_check_verifyFailPartial_noComplete.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0061_check_verifyFailPartial_noComplete.xul
@@ -31,17 +31,17 @@ const TESTS = [ {
   buttonClick: "finish"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1&partialPatchOnly=1" +
             "&invalidPartialSize=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0062_check_verifyFailComplete_noPartial.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0062_check_verifyFailComplete_noPartial.xul
@@ -31,17 +31,17 @@ const TESTS = [ {
   buttonClick: "finish"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1&completePatchOnly=1" +
             "&invalidCompleteSize=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0063_check_verifyFailPartialComplete.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0063_check_verifyFailPartialComplete.xul
@@ -31,17 +31,17 @@ const TESTS = [ {
   buttonClick: "finish"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1&invalidPartialSize=1" +
             "&invalidCompleteSize=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0064_check_verifyFailPartial_successComplete.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0064_check_verifyFailPartial_successComplete.xul
@@ -31,17 +31,17 @@ const TESTS = [ {
   buttonClick: "extra1"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1&invalidPartialSize=1" +
             getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0101_background_restartNotification.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0101_background_restartNotification.xul
@@ -25,17 +25,17 @@ const TESTS = [ {
 } ];
 
 function runTest() {
   debugDump("entering");
 
   Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gAUS.notify(null);
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0102_background_restartNotification_staging.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0102_background_restartNotification_staging.xul
@@ -28,17 +28,17 @@ gUseTestUpdater = true;
 
 function runTest() {
   debugDump("entering");
 
   Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
   Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gAUS.notify(null);
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0103_background_restartNotification_stagingService.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0103_background_restartNotification_stagingService.xul
@@ -29,17 +29,17 @@ gUseTestUpdater = true;
 function runTest() {
   debugDump("entering");
 
   Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
   Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, true);
   Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gAUS.notify(null);
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0111_neverButton_basic.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0111_neverButton_basic.xul
@@ -31,17 +31,17 @@ const TESTS = [ {
   buttonClick: "extra2"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showNever=1&showDetails=1" +
             getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   // add the never preference for this version to verify that checking for
   // updates clears the preference.
   Services.prefs.setBoolPref(gPrefToCheck, true)
 
   gUP.checkForUpdates();
 }
 
--- a/toolkit/mozapps/update/tests/chrome/test_0113_showNeverForVersionRemovedWithPref.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0113_showNeverForVersionRemovedWithPref.xul
@@ -28,17 +28,17 @@ const TESTS = [ {
   buttonClick: "extra1"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
             getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   // add the never preference for this version to verify that checking for
   // updates clears the preference.
   Services.prefs.setBoolPref(gPrefToCheck, true)
 
   gAUS.notify(null);
 }
 
--- a/toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul
@@ -26,17 +26,17 @@ const TESTS = [ {
   displayedTextElem: "bgErrorLabel",
   buttonClick: "finish"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?xmlMalformed=1";
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   errorsPrefObserver.init(PREF_APP_UPDATE_BACKGROUNDERRORS,
                           PREF_APP_UPDATE_BACKGROUNDMAXERRORS);
 
   gAUS.notify(null);
 }
 
 ]]>
--- a/toolkit/mozapps/update/tests/chrome/test_0152_notify_backgroundCheckOfflineRetry.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0152_notify_backgroundCheckOfflineRetry.xul
@@ -26,17 +26,17 @@ const TESTS = [ {
 
 const NETWORK_ERROR_OFFLINE = 111;
 var gProxyPrefValue;
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, true);
   Services.prefs.setBoolPref(PREF_APP_UPDATE_AUTO, false);
 
   Services.io.offline = true;
   gProxyPrefValue = Services.prefs.getIntPref("network.proxy.type");
   Services.prefs.setIntPref("network.proxy.type", 0);
 
--- a/toolkit/mozapps/update/tests/chrome/test_0161_check_unsupported.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0161_check_unsupported.xul
@@ -29,17 +29,17 @@ const TESTS = [ {
 function runTest() {
   debugDump("entering");
 
   // When checking manually the unsupported page should still be shown even if
   // it was shown previously.
   Services.prefs.setBoolPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED, true);
 
   let url = URL_HTTP_UPDATE_XML + "?unsupported=1";
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0162_notify_unsupported.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0162_notify_unsupported.xul
@@ -23,17 +23,17 @@ const TESTS = [ {
   pageid: PAGEID_UNSUPPORTED,
   buttonClick: "finish"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?unsupported=1";
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gAUS.notify(null);
 }
 
 ]]>
 </script>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
--- a/toolkit/mozapps/update/tests/chrome/test_0171_check_noPerms_manual.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0171_check_noPerms_manual.xul
@@ -31,17 +31,17 @@ function runTest() {
   debugDump("entering");
 
   let file = getWriteTestFile();
   file.create(file.NORMAL_FILE_TYPE, 0o444);
   file.fileAttributesWin |= file.WFA_READONLY;
   file.fileAttributesWin &= ~file.WFA_READWRITE;
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gUP.checkForUpdates();
 }
 
 function getWriteTestFile() {
   let file = getAppBaseDir();
   file.append(FILE_UPDATE_TEST);
   file.QueryInterface(Ci.nsILocalFileWin);
--- a/toolkit/mozapps/update/tests/chrome/test_0172_notify_noPerms_manual.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0172_notify_noPerms_manual.xul
@@ -30,17 +30,17 @@ function runTest() {
 
   let file = getWriteTestFile();
   file.create(file.NORMAL_FILE_TYPE, 0o444);
   file.fileAttributesWin |= file.WFA_READONLY;
   file.fileAttributesWin &= ~file.WFA_READWRITE;
 
   let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
             getVersionParams();
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
 
   gAUS.checkForBackgroundUpdates();
 }
 
 function getWriteTestFile() {
   let file = getAppBaseDir();
   file.append(FILE_UPDATE_TEST);
   file.QueryInterface(Ci.nsILocalFileWin);
--- a/toolkit/mozapps/update/tests/chrome/utils.js
+++ b/toolkit/mozapps/update/tests/chrome/utils.js
@@ -129,17 +129,16 @@ const CLOSE_WINDOW_TIMEOUT_MAXCOUNT = 10
 var gCloseWindowTimeoutCounter = 0;
 
 // The following vars are for restoring previous preference values (if present)
 // when the test finishes.
 var gAppUpdateEnabled;            // app.update.enabled
 var gAppUpdateServiceEnabled;     // app.update.service.enabled
 var gAppUpdateStagingEnabled;     // app.update.staging.enabled
 var gAppUpdateURLDefault;         // app.update.url (default prefbranch)
-var gAppUpdateURL;                // app.update.url.override
 
 var gTestCounter = -1;
 var gWin;
 var gDocElem;
 var gPrefToCheck;
 var gUseTestUpdater = false;
 
 // Set to true to log additional information for debugging. To log additional
@@ -795,20 +794,16 @@ function setupPrefs() {
   // Prevent nsIUpdateTimerManager from notifying nsIApplicationUpdateService
   // to check for updates by setting the app update last update time to the
   // current time minus one minute in seconds and the interval time to 12 hours
   // in seconds.
   let now = Math.round(Date.now() / 1000) - 60;
   Services.prefs.setIntPref(PREF_APP_UPDATE_LASTUPDATETIME, now);
   Services.prefs.setIntPref(PREF_APP_UPDATE_INTERVAL, 43200);
 
-  if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_URL_OVERRIDE)) {
-    gAppUpdateURL = Services.prefs.getCharPref(PREF_APP_UPDATE_URL_OVERRIDE);
-  }
-
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ENABLED)) {
     gAppUpdateEnabled = Services.prefs.getBoolPref(PREF_APP_UPDATE_ENABLED);
   }
   Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, true);
 
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_SERVICE_ENABLED)) {
     gAppUpdateServiceEnabled = Services.prefs.getBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED);
   }
@@ -857,22 +852,16 @@ function resetFiles() {
     }
   }
 }
 
 /**
  * Resets the most common preferences used by tests to their original values.
  */
 function resetPrefs() {
-  if (gAppUpdateURL !== undefined) {
-    Services.prefs.setCharPref(PREF_APP_UPDATE_URL_OVERRIDE, gAppUpdateURL);
-  } else if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_URL_OVERRIDE)) {
-    Services.prefs.clearUserPref(PREF_APP_UPDATE_URL_OVERRIDE);
-  }
-
   if (gAppUpdateURLDefault) {
     gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, gAppUpdateURLDefault);
   }
 
   if (gAppUpdateEnabled !== undefined) {
     Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, gAppUpdateEnabled);
   } else if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ENABLED)) {
     Services.prefs.clearUserPref(PREF_APP_UPDATE_ENABLED);
--- a/toolkit/mozapps/update/tests/data/shared.js
+++ b/toolkit/mozapps/update/tests/data/shared.js
@@ -19,17 +19,16 @@ const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTE
 const PREF_APP_UPDATE_PROMPTWAITTIME       = "app.update.promptWaitTime";
 const PREF_APP_UPDATE_RETRYTIMEOUT         = "app.update.socket.retryTimeout";
 const PREF_APP_UPDATE_SERVICE_ENABLED      = "app.update.service.enabled";
 const PREF_APP_UPDATE_SILENT               = "app.update.silent";
 const PREF_APP_UPDATE_SOCKET_MAXERRORS     = "app.update.socket.maxErrors";
 const PREF_APP_UPDATE_STAGING_ENABLED      = "app.update.staging.enabled";
 const PREF_APP_UPDATE_URL                  = "app.update.url";
 const PREF_APP_UPDATE_URL_DETAILS          = "app.update.url.details";
-const PREF_APP_UPDATE_URL_OVERRIDE         = "app.update.url.override";
 
 const PREFBRANCH_APP_UPDATE_NEVER = "app.update.never.";
 
 const PREFBRANCH_APP_PARTNER         = "app.partner.";
 const PREF_DISTRIBUTION_ID           = "distribution.id";
 const PREF_DISTRIBUTION_VERSION      = "distribution.version";
 const PREF_TOOLKIT_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
 
@@ -163,26 +162,26 @@ const observer = {
 function setUpdateChannel(aChannel) {
   gChannel = aChannel;
   debugDump("setting default pref " + PREF_APP_UPDATE_CHANNEL + " to " + gChannel);
   gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_CHANNEL, gChannel);
   gPrefRoot.addObserver(PREF_APP_UPDATE_CHANNEL, observer, false);
 }
 
 /**
- * Sets the app.update.url.override preference.
+ * Sets the app.update.url default preference.
  *
  * @param  aURL
  *         The update url. If not specified 'URL_HOST + "/update.xml"' will be
  *         used.
  */
-function setUpdateURLOverride(aURL) {
+function setUpdateURL(aURL) {
   let url = aURL ? aURL : URL_HOST + "/update.xml";
-  debugDump("setting " + PREF_APP_UPDATE_URL_OVERRIDE + " to " + url);
-  Services.prefs.setCharPref(PREF_APP_UPDATE_URL_OVERRIDE, url);
+  debugDump("setting " + PREF_APP_UPDATE_URL + " to " + url);
+  gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
 }
 
 /**
  * Returns either the active or regular update database XML file.
  *
  * @param  isActiveUpdate
  *         If true this will return the active-update.xml otherwise it will
  *         return the updates.xml file.
--- a/toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js
@@ -13,17 +13,17 @@ function run_test() {
   do_get_profile();
 
   setupTestCommon();
 
   debugDump("testing mar download and mar hash verification");
 
   Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
   start_httpserver();
-  setUpdateURLOverride(gURLData + gHTTPHandlerPath);
+  setUpdateURL(gURLData + gHTTPHandlerPath);
   standardInit();
   // Only perform the non hash check tests when mar signing is enabled since the
   // update service doesn't perform hash checks when mar signing is enabled.
   if (MOZ_VERIFY_MAR_SIGNATURE) {
     do_execute_soon(run_test_pt11);
   } else {
     do_execute_soon(run_test_pt1);
   }
--- a/toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js
@@ -18,17 +18,17 @@ var gExpectedStatusResult;
 function run_test() {
   setupTestCommon();
 
   debugDump("testing mar downloads, mar hash verification, and " +
             "mar download interrupted recovery");
 
   Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
   start_httpserver();
-  setUpdateURLOverride(gURLData + gHTTPHandlerPath);
+  setUpdateURL(gURLData + gHTTPHandlerPath);
   standardInit();
   do_execute_soon(run_test_pt1);
 }
 
 // The HttpServer must be stopped before calling do_test_finished
 function finish_test() {
   stop_httpserver(doTestFinish);
 }
--- a/toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js
@@ -7,17 +7,17 @@ var gNextRunFunc;
 var gExpectedCount;
 
 function run_test() {
   setupTestCommon();
 
   debugDump("testing remote update xml attributes");
 
   start_httpserver();
-  setUpdateURLOverride(gURLData + gHTTPHandlerPath);
+  setUpdateURL(gURLData + gHTTPHandlerPath);
   setUpdateChannel("test_channel");
 
   // This test expects that the app.update.download.backgroundInterval
   // preference doesn't already exist.
   Services.prefs.deleteBranch("app.update.download.backgroundInterval");
 
   standardInit();
   do_execute_soon(run_test_pt01);
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
@@ -28,17 +28,17 @@ function run_test() {
 
   debugDump("testing that an update download doesn't start when the " +
             PREF_APP_UPDATE_AUTO + " preference is false");
 
   Services.prefs.setBoolPref(PREF_APP_UPDATE_AUTO, false);
   Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
 
   start_httpserver();
-  setUpdateURLOverride(gURLData + gHTTPHandlerPath);
+  setUpdateURL(gURLData + gHTTPHandlerPath);
   standardInit();
 
   let windowWatcherCID =
     MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
                            WindowWatcher);
   let windowMediatorCID =
     MockRegistrar.register("@mozilla.org/appshell/window-mediator;1",
                            WindowMediator);
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
@@ -24,17 +24,17 @@ function run_test() {
   setupTestCommon();
 
   debugDump("testing nsIUpdatePrompt notifications should not be displayed " +
             "when showUpdateAvailable is called for an unsupported system " +
             "update when the unsupported notification has already been " +
             "shown (bug 843497)");
 
   start_httpserver();
-  setUpdateURLOverride(gURLData + gHTTPHandlerPath);
+  setUpdateURL(gURLData + gHTTPHandlerPath);
   standardInit();
 
   let windowWatcherCID =
     MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
                            WindowWatcher);
   let windowMediatorCID =
     MockRegistrar.register("@mozilla.org/appshell/window-mediator;1",
                            WindowMediator);
--- a/toolkit/mozapps/update/tests/unit_aus_update/urlConstruction.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/urlConstruction.js
@@ -48,17 +48,17 @@ function run_test_pt1() {
   gDefaultPrefBranch.setCharPref(PREF_DISTRIBUTION_ID, "test_distro");
   gDefaultPrefBranch.setCharPref(PREF_DISTRIBUTION_VERSION, "test_distro_version");
 
   let url = URL_PREFIX + "%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/" +
             "%LOCALE%/%CHANNEL%/%PLATFORM_VERSION%/%OS_VERSION%/" +
             "%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/" +
             "updates.xml";
   debugDump("testing url construction - url: " + url);
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
   try {
     gUpdateChecker.checkForUpdates(updateCheckListener, true);
   } catch (e) {
     debugDump("The following error is most likely due to a missing " +
               "update.locale file");
     do_throw(e);
   }
 }
@@ -82,17 +82,17 @@ function check_test_pt1() {
 // url constructed with:
 // %CHANNEL% with distribution partners
 // %CUSTOM% parameter
 // force param when there already is a param - bug 454357
 function run_test_pt2() {
   gCheckFunc = check_test_pt2;
   let url = URL_PREFIX + "%CHANNEL%/updates.xml?custom=%CUSTOM%";
   debugDump("testing url constructed with %CHANNEL% - " + url);
-  setUpdateURLOverride(url);
+  setUpdateURL(url);
   gDefaultPrefBranch.setCharPref(PREFBRANCH_APP_PARTNER + "test_partner1",
                                  "test_partner1");
   gDefaultPrefBranch.setCharPref(PREFBRANCH_APP_PARTNER + "test_partner2",
                                  "test_partner2");
   Services.prefs.setCharPref("app.update.custom", "custom");
   gUpdateChecker.checkForUpdates(updateCheckListener, true);
 }