Back out 7c8506b0729d (bug 843497) since I already backed out the rest of the bug's patches for xpcshell failures
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 21 Jun 2013 19:52:48 -0700
changeset 147560 0fd721c4a35fcf1cae5dc57967b805d8e51984ea
parent 147559 089f6bad69de395faab906c2d612e88e811f3427
child 147561 17c4c99f1ac2e9b2fc1b039266807656980a40c0
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs843497
milestone24.0a1
backs out7c8506b0729d23129ed4154823f2f2c4e2bc6614
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
Back out 7c8506b0729d (bug 843497) since I already backed out the rest of the bug's patches for xpcshell failures
toolkit/mozapps/update/test/unit/test_0030_general.js
toolkit/mozapps/update/test/unit/test_0082_prompt_unsupportAlreadyNotified.js
toolkit/mozapps/update/test/unit/xpcshell.ini
--- a/toolkit/mozapps/update/test/unit/test_0030_general.js
+++ b/toolkit/mozapps/update/test/unit/test_0030_general.js
@@ -238,23 +238,23 @@ var newFactory = {
   },
   QueryInterface: XPCOMUtils.generateQI([AUS_Ci.nsIFactory])
 };
 
 function initMockIncrementalDownload() {
   var registrar = AUS_Cm.QueryInterface(AUS_Ci.nsIComponentRegistrar);
   gIncrementalDownloadClassID = registrar.contractIDToCID(INC_CONTRACT_ID);
   gIncOldFactory = AUS_Cm.getClassObject(AUS_Cc[INC_CONTRACT_ID],
-                                         AUS_Ci.nsIFactory);
+                                     AUS_Ci.nsIFactory);
   registrar.unregisterFactory(gIncrementalDownloadClassID, gIncOldFactory);
   var components = [IncrementalDownload];
   registrar.registerFactory(gIncrementalDownloadClassID, "",
                             INC_CONTRACT_ID, newFactory);
   gIncOldFactory = AUS_Cm.getClassObject(AUS_Cc[INC_CONTRACT_ID],
-                                         AUS_Ci.nsIFactory);
+                                     AUS_Ci.nsIFactory);
 }
 
 function cleanupMockIncrementalDownload() {
   if (gIncOldFactory) {
     var registrar = AUS_Cm.QueryInterface(AUS_Ci.nsIComponentRegistrar);
     registrar.unregisterFactory(gIncrementalDownloadClassID, newFactory);
     registrar.registerFactory(gIncrementalDownloadClassID, "",
                               INC_CONTRACT_ID, gIncOldFactory);
deleted file mode 100644
--- a/toolkit/mozapps/update/test/unit/test_0082_prompt_unsupportAlreadyNotified.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test that nsIUpdatePrompt doesn't display UI for showUpdateAvailable for an
- * unsupported system update when it has already been shown (bug 843497).
- */
-
-function run_test() {
-  do_test_pending();
-  do_register_cleanup(end_test);
-  removeUpdateDirsAndFiles();
-  setUpdateURLOverride();
-  // The mock XMLHttpRequest is MUCH faster
-  overrideXHR(callHandleEvent);
-  standardInit();
-  // The HTTP server is only used for the mar file downloads which is slow
-  start_httpserver(URL_PATH);
-
-  let registrar = Components.manager.QueryInterface(AUS_Ci.nsIComponentRegistrar);
-  registrar.registerFactory(Components.ID("{1dfeb90a-2193-45d5-9cb8-864928b2af55}"),
-                            "Fake Window Watcher",
-                            "@mozilla.org/embedcomp/window-watcher;1",
-                            WindowWatcherFactory);
-  registrar.registerFactory(Components.ID("{1dfeb90a-2193-45d5-9cb8-864928b2af56}"),
-                            "Fake Window Mediator",
-                            "@mozilla.org/appshell/window-mediator;1",
-                            WindowMediatorFactory);
-
-  logTestInfo("testing nsIUpdatePrompt notifications should not be seen for " +
-              "an unsupported system update when it has already been shown");
-
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED, true);
-  // This preference is used to determine when the background update check has
-  // completed since a successful check will clear the preference.
-  Services.prefs.setIntPref(PREF_APP_UPDATE_BACKGROUNDERRORS, 1);
-
-  gResponseBody = getRemoteUpdatesXMLString("  <update type=\"major\" " +
-                                            "name=\"Unsupported Update\" " +
-                                            "unsupported=\"true\" " +
-                                            "detailsURL=\"" + URL_HOST +
-                                            "\"></update>\n");
-  gAUS.notify(null);
-  do_execute_soon(check_test);
-}
-
-function check_test() {
-  if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS)) {
-    do_execute_soon(check_test);
-    return;
-  }
-  do_check_true(true);
-  do_test_finished();
-}
-
-function end_test() {
-  let registrar = Components.manager.QueryInterface(AUS_Ci.nsIComponentRegistrar);
-  registrar.unregisterFactory(Components.ID("{1dfeb90a-2193-45d5-9cb8-864928b2af55}"),
-                              WindowWatcherFactory);
-  registrar.unregisterFactory(Components.ID("{1dfeb90a-2193-45d5-9cb8-864928b2af56}"),
-                              WindowMediatorFactory);
-  cleanUp();
-}
-
-// Callback function used by the custom XMLHttpRequest implementation to
-// call the nsIDOMEventListener's handleEvent method for onload.
-function callHandleEvent() {
-  gXHR.status = 400;
-  gXHR.responseText = gResponseBody;
-  try {
-    var parser = AUS_Cc["@mozilla.org/xmlextras/domparser;1"].
-                 createInstance(AUS_Ci.nsIDOMParser);
-    gXHR.responseXML = parser.parseFromString(gResponseBody, "application/xml");
-  }
-  catch(e) {
-  }
-  var e = { target: gXHR };
-  gXHR.onload(e);
-}
-
-function check_showUpdateAvailable() {
-  do_throw("showUpdateAvailable should not have called openWindow!");
-}
-
-var WindowWatcher = {
-  openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
-    check_showUpdateAvailable();
-  },
-
-  QueryInterface: function(aIID) {
-    if (aIID.equals(AUS_Ci.nsIWindowWatcher) ||
-        aIID.equals(AUS_Ci.nsISupports))
-      return this;
-
-    throw AUS_Cr.NS_ERROR_NO_INTERFACE;
-  }
-}
-
-var WindowWatcherFactory = {
-  createInstance: function createInstance(aOuter, aIID) {
-    if (aOuter != null)
-      throw AUS_Cr.NS_ERROR_NO_AGGREGATION;
-    return WindowWatcher.QueryInterface(aIID);
-  }
-};
-
-var WindowMediator = {
-  getMostRecentWindow: function(aWindowType) {
-    return null;
-  },
-
-  QueryInterface: function(aIID) {
-    if (aIID.equals(AUS_Ci.nsIWindowMediator) ||
-        aIID.equals(AUS_Ci.nsISupports))
-      return this;
-
-    throw AUS_Cr.NS_ERROR_NO_INTERFACE;
-  }
-}
-
-var WindowMediatorFactory = {
-  createInstance: function createInstance(aOuter, aIID) {
-    if (aOuter != null)
-      throw AUS_Cr.NS_ERROR_NO_AGGREGATION;
-    return WindowMediator.QueryInterface(aIID);
-  }
-};
--- a/toolkit/mozapps/update/test/unit/xpcshell.ini
+++ b/toolkit/mozapps/update/test/unit/xpcshell.ini
@@ -15,19 +15,16 @@ tail =
 [test_0070_update_dir_cleanup.js]
 [test_0071_update_dir_cleanup.js]
 [test_0072_update_dir_cleanup.js]
 [test_0073_update_dir_cleanup.js]
 [test_0080_prompt_silent.js]
 [test_0081_prompt_uiAlreadyOpen.js]
 skip-if = toolkit == "gonk"
 reason = custom nsIUpdatePrompt
-[test_0082_prompt_unsupportAlreadyNotified.js]
-skip-if = toolkit == "gonk"
-reason = custom nsIUpdatePrompt
 ; Tests that require the updater binary
 [include:xpcshell_updater.ini]
 skip-if = os == 'android'
 [include:xpcshell_updater_windows.ini]
 run-if = os == 'win'
 [include:xpcshell_updater_xp_unix.ini]
 run-if = os == 'linux' || os == 'mac' || os == 'sunos'
 [test_0160_appInUse_complete.js]