xpcshell test fixup - Bug 843497 - Update check says 'up to date' for out of date versions on unsupported OS versions. r=me for test fixup
authorRobert Strong <robert.bugzilla@gmail.com>
Sat, 22 Jun 2013 13:37:20 -0700
changeset 136184 17363c63cf55ade2b7df90b0736c930d9ed05ddc
parent 136183 58de9b0f98d0ad970839d7abf3f943b2f284cc8e
child 136185 1ea803d6be37b42531ebaf0dba7427a88549b79d
push id24864
push userphilringnalda@gmail.com
push dateSun, 23 Jun 2013 22:10:23 +0000
treeherdermozilla-central@86ce13c57871 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs843497
milestone24.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
xpcshell test fixup - Bug 843497 - Update check says 'up to date' for out of date versions on unsupported OS versions. r=me for test fixup
browser/components/test/browser_bug538331.js
toolkit/mozapps/update/test/sharedUpdateXML.js
toolkit/mozapps/update/test/unit/test_0020_general.js
toolkit/mozapps/update/test/unit/test_0060_manager.js
--- a/browser/components/test/browser_bug538331.js
+++ b/browser/components/test/browser_bug538331.js
@@ -15,17 +15,17 @@ const XML_EMPTY = "<?xml version=\"1.0\"
                   "\"http://www.mozilla.org/2005/app-update\"></updates>";
 
 const XML_PREFIX =  "<updates xmlns=\"http://www.mozilla.org/2005/app-update\"" +
                     "><update appVersion=\"1.0\" buildID=\"20080811053724\" " +
                     "channel=\"nightly\" displayVersion=\"Version 1.0\" " +
                     "extensionVersion=\"1.0\" installDate=\"1238441400314\" " +
                     "isCompleteUpdate=\"true\" name=\"Update Test 1.0\" " +
                     "serviceURL=\"https://example.com/\" showNeverForVersion=" +
-                    "\"false\" showPrompt=\"false\" showSurvey=\"false\" type=" +
+                    "\"false\" showPrompt=\"false\" type=" +
                     "\"minor\" version=\"version 1.0\" detailsURL=" +
                     "\"http://example.com/\" previousAppVersion=\"1.0\" " +
                     "statusText=\"The Update was successfully installed\" " +
                     "foregroundDownload=\"true\"";
 
 const XML_SUFFIX = "><patch type=\"complete\" URL=\"http://example.com/\" " +
                    "hashFunction=\"MD5\" hashValue=" +
                    "\"6232cd43a1c77e30191c53a329a3f99d\" size=\"775\" " +
--- a/toolkit/mozapps/update/test/sharedUpdateXML.js
+++ b/toolkit/mozapps/update/test/sharedUpdateXML.js
@@ -310,33 +310,31 @@ function getUpdateString(aType, aName, a
   let licenseURL = aLicenseURL ? "licenseURL=\"" + aLicenseURL + "\" " : "";
   let showPrompt = aShowPrompt ? "showPrompt=\"" + aShowPrompt + "\" " : "";
   let showNeverForVersion = aShowNeverForVersion ? "showNeverForVersion=\"" +
                                                    aShowNeverForVersion + "\" "
                                                  : "";
   let promptWaitTime = aPromptWaitTime ? "promptWaitTime=\"" + aPromptWaitTime +
                                          "\" "
                                        : "";
-  let showSurvey = aShowSurvey ? "showSurvey=\"" + aShowSurvey + "\" " : "";
   let custom1 = aCustom1 ? aCustom1 + " " : "";
   let custom2 = aCustom2 ? aCustom2 + " " : "";
   return "  <update type=\"" + type + "\" " +
                    "name=\"" + name + "\" " +
                     displayVersion +
                     version +
                     appVersion +
                     extensionVersion +
                     platformVersion +
                     detailsURL +
                     billboardURL +
                     licenseURL +
                     showPrompt +
                     showNeverForVersion +
                     promptWaitTime +
-                    showSurvey +
                     custom1 +
                     custom2 +
                    "buildID=\"" + buildID + "\"";
 }
 
 /**
  * Constructs a string representing a patch element for an update xml file.
  *
--- a/toolkit/mozapps/update/test/unit/test_0020_general.js
+++ b/toolkit/mozapps/update/test/unit/test_0020_general.js
@@ -114,17 +114,16 @@ function check_test_pt02() {
   do_check_eq(bestUpdate.platformVersion, "3.1a1pre");
   do_check_eq(bestUpdate.buildID, "20080811053724");
   do_check_eq(bestUpdate.detailsURL, "http://details/");
   do_check_eq(bestUpdate.billboardURL, "http://billboard/");
   do_check_eq(bestUpdate.licenseURL, "http://license/");
   do_check_true(bestUpdate.showPrompt);
   do_check_true(bestUpdate.showNeverForVersion);
   do_check_eq(bestUpdate.promptWaitTime, "345600");
-  do_check_true(bestUpdate.showSurvey);
   do_check_eq(bestUpdate.serviceURL, URL_HOST + "update.xml?force=1");
   do_check_eq(bestUpdate.channel, "test_channel");
   do_check_false(bestUpdate.isCompleteUpdate);
   do_check_false(bestUpdate.isSecurityUpdate);
   // Check that installDate is within 10 seconds of the current date.
   do_check_true((Date.now() - bestUpdate.installDate) < 10000);
   do_check_eq(bestUpdate.statusText, null);
   // nsIUpdate:state returns an empty string when no action has been performed
@@ -195,17 +194,16 @@ function check_test_pt03() {
   do_check_eq(bestUpdate.platformVersion, "5.1a1pre");
   do_check_eq(bestUpdate.buildID, "20080811053724");
   do_check_eq(bestUpdate.detailsURL, "http://details/");
   do_check_eq(bestUpdate.billboardURL, "http://details/");
   do_check_eq(bestUpdate.licenseURL, null);
   do_check_true(bestUpdate.showPrompt);
   do_check_true(bestUpdate.showNeverForVersion);
   do_check_eq(bestUpdate.promptWaitTime, "691200");
-  do_check_false(bestUpdate.showSurvey);
   do_check_eq(bestUpdate.serviceURL, URL_HOST + "update.xml?force=1");
   do_check_eq(bestUpdate.channel, "test_channel");
   do_check_false(bestUpdate.isCompleteUpdate);
   do_check_false(bestUpdate.isSecurityUpdate);
   // Check that installDate is within 10 seconds of the current date.
   do_check_true((Date.now() - bestUpdate.installDate) < 10000);
   do_check_eq(bestUpdate.statusText, null);
   // nsIUpdate:state returns an empty string when no action has been performed
--- a/toolkit/mozapps/update/test/unit/test_0060_manager.js
+++ b/toolkit/mozapps/update/test/unit/test_0060_manager.js
@@ -66,17 +66,16 @@ function run_test() {
   do_check_eq(update.installDate, "1238441300314");
   // statusText is updated
   do_check_eq(update.statusText, getString("installSuccess"));
   do_check_false(update.isCompleteUpdate);
   do_check_eq(update.channel, "test_channel");
   do_check_true(update.showPrompt);
   do_check_true(update.showNeverForVersion);
   do_check_eq(update.promptWaitTime, "345600");
-  do_check_true(update.showSurvey);
   do_check_eq(update.previousAppVersion, "3.0");
   // Custom attributes
   do_check_eq(update.getProperty("custom1_attr"), "custom1 value");
   do_check_eq(update.getProperty("custom2_attr"), "custom2 value");
 
   patch = update.selectedPatch;
   do_check_eq(patch.type, "partial");
   do_check_eq(patch.URL, "http://partial/");
@@ -100,17 +99,16 @@ function run_test() {
   do_check_eq(update.installDate, "1238441400314");
   do_check_eq(update.statusText, getString("patchApplyFailure"));
   do_check_eq(update.buildID, "20080811053724");
   do_check_true(update.isCompleteUpdate);
   do_check_eq(update.channel, "test_channel");
   do_check_true(update.showPrompt);
   do_check_true(update.showNeverForVersion);
   do_check_eq(update.promptWaitTime, "691200");
-  do_check_false(update.showSurvey);
   do_check_eq(update.previousAppVersion, null);
   // Custom attributes
   do_check_eq(update.getProperty("custom3_attr"), "custom3 value");
   do_check_eq(update.getProperty("custom4_attr"), "custom4 value");
 
   patch = update.selectedPatch;
   do_check_eq(patch.type, "complete");
   do_check_eq(patch.URL, "http://complete/");
@@ -167,17 +165,16 @@ function run_test() {
   do_check_eq(update.installDate, "1238441400314");
   do_check_eq(update.statusText, getString("installSuccess"));
   do_check_eq(update.buildID, "20080811053724");
   do_check_true(update.isCompleteUpdate);
   do_check_eq(update.channel, "test_channel");
   do_check_true(update.showPrompt);
   do_check_true(update.showNeverForVersion);
   do_check_eq(update.promptWaitTime, "100");
-  do_check_true(update.showSurvey);
   do_check_eq(update.previousAppVersion, "3.0");
 
   patch = update.selectedPatch;
   do_check_eq(patch.type, "complete");
   do_check_eq(patch.URL, URL_HOST + URL_PATH + "/" + FILE_SIMPLE_MAR);
   do_check_eq(patch.hashFunction, "MD5");
   do_check_eq(patch.hashValue, MD5_HASH_SIMPLE_MAR);
   do_check_eq(patch.size, SIZE_SIMPLE_MAR);
@@ -198,17 +195,16 @@ function run_test() {
   do_check_eq(update.installDate, "1238441400314");
   do_check_eq(update.statusText, getString("patchApplyFailure"));
   do_check_eq(update.buildID, "20080811053724");
   do_check_true(update.isCompleteUpdate);
   do_check_eq(update.channel, "test_channel");
   do_check_false(update.showPrompt);
   do_check_false(update.showNeverForVersion);
   do_check_eq(update.promptWaitTime, "200");
-  do_check_false(update.showSurvey);
   do_check_eq(update.previousAppVersion, null);
 
   patch = update.selectedPatch;
   do_check_eq(patch.type, "complete");
   do_check_eq(patch.URL, URL_HOST + URL_PATH + "/" + FILE_SIMPLE_MAR);
   do_check_eq(patch.hashFunction, "MD5");
   do_check_eq(patch.hashValue, MD5_HASH_SIMPLE_MAR);
   do_check_eq(patch.size, SIZE_SIMPLE_MAR);