Bug 1309961 - don't allow preferences to interfere with running updateManagerXML.js test. r=mhowell
authorRobert Strong <robert.bugzilla@gmail.com>
Fri, 14 Oct 2016 14:10:18 -0700
changeset 318137 238cebc6be2e93c87133709ae19f28ee23f508b2
parent 318136 4df9e6ee8dc461273ef96cee730ddce5e9270736
child 318138 afdefb5fc27ef4ed65f08d881fd46456e8ac7be5
push id33211
push usercbook@mozilla.com
push dateMon, 17 Oct 2016 09:38:38 +0000
treeherderautoland@e4ef6fa03aa8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhowell
bugs1309961
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1309961 - don't allow preferences to interfere with running updateManagerXML.js test. r=mhowell
toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js
toolkit/mozapps/update/tests/unit_aus_update/updateManagerXML.js
--- a/toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js
@@ -9,16 +9,21 @@ var gExpectedCount;
 function run_test() {
   setupTestCommon();
 
   debugDump("testing remote update xml attributes");
 
   start_httpserver();
   setUpdateURLOverride(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);
 }
 
 // Helper function for testing update counts returned from an update xml
 function run_test_helper_pt1(aMsg, aExpectedCount, aNextRunFunc) {
   gUpdates = null;
   gUpdateCount = null;
--- a/toolkit/mozapps/update/tests/unit_aus_update/updateManagerXML.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/updateManagerXML.js
@@ -7,16 +7,20 @@ function run_test() {
   setupTestCommon();
 
   debugDump("testing addition of a successful update to " + FILE_UPDATES_XML +
             " and verification of update properties including the format " +
             "prior to bug 530872");
 
   setUpdateChannel("test_channel");
 
+  // This test expects that the app.update.download.backgroundInterval
+  // preference doesn't already exist.
+  Services.prefs.deleteBranch("app.update.download.backgroundInterval");
+
   // XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
   // and until bug 470244 is fixed this will not test the value for detailsURL
   // when it isn't specified in the update xml.
   let patches = getLocalPatchString("partial", "http://partial/", "SHA256",
                                     "cd43", "86", "true", STATE_PENDING);
   let updates = getLocalUpdateString(patches, "major", "New", "version 4",
                                      "4.0", "20070811053724",
                                      "http://details1/",