Backed out changeset 70b67abc4699 (bug 1149590) for xpcshell failures a=bustage
authorWes Kocher <wkocher@mozilla.com>
Tue, 07 Apr 2015 15:00:35 -0700
changeset 254876 85071beda9363e853d809a2534728d821bc6f0ee
parent 254875 da142b0672349d9116d02aa00c74c1dfc8319b56
child 254877 2eecf1fbd302c7fa7f8db344ff5f3f4a46fc6544
push id7891
push userkwierso@gmail.com
push dateTue, 07 Apr 2015 22:00:38 +0000
treeherdermozilla-aurora@85071beda936 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1149590
milestone39.0a2
backs out70b67abc46995532d7bab7cf9c07440c9fe10d86
Backed out changeset 70b67abc4699 (bug 1149590) for xpcshell failures a=bustage
toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
deleted file mode 100644
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-Components.utils.import("resource://testing-common/MockRegistrar.jsm");
-
-function run_test() {
-  setupTestCommon();
-  // Calling do_get_profile prevents an error from being logged
-  do_get_profile();
-
-  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);
-
-  setUpdateURLOverride();
-  // The mock XMLHttpRequest is MUCH faster
-  overrideXHR(callHandleEvent);
-  standardInit();
-
-  let windowWatcherCID =
-    MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
-                           WindowWatcher);
-  let windowMediatorCID =
-    MockRegistrar.register("@mozilla.org/appshell/window-mediator;1",
-                           WindowMediator);
-  do_register_cleanup(() => {
-    MockRegistrar.unregister(windowWatcherCID);
-    MockRegistrar.unregister(windowMediatorCID);
-  });
-
-  gCheckFunc = check_showUpdateAvailable;
-  let patches = getRemotePatchString("complete");
-  let updates = getRemoteUpdateString(patches, "minor", null, null, "1.0");
-  gResponseBody = getRemoteUpdatesXMLString(updates);
-  gAUS.notify(null);
-}
-
-function check_status() {
-  let status = readStatusFile();
-  Assert.notEqual(status, STATE_DOWNLOADING,
-                  "the update should not be downloading");
-
-  // Pause the download and reload the Update Manager with an empty update so
-  // the Application Update Service doesn't write the update xml files during
-  // xpcom-shutdown which will leave behind the test directory.
-  gAUS.pauseDownload();
-  writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), true);
-  writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
-  reloadUpdateManagerData();
-
-  do_execute_soon(doTestFinish);
-}
-
-// Callback function used by the custom XMLHttpRequest implementation to
-// call the nsIDOMEventListener's handleEvent method for onload.
-function callHandleEvent(aXHR) {
-  aXHR.status = 400;
-  aXHR.responseText = gResponseBody;
-  try {
-    let parser = Cc["@mozilla.org/xmlextras/domparser;1"].
-                 createInstance(Ci.nsIDOMParser);
-    aXHR.responseXML = parser.parseFromString(gResponseBody, "application/xml");
-  } catch (e) {
-  }
-  let e = { target: aXHR };
-  aXHR.onload(e);
-}
-
-function check_showUpdateAvailable() {
-  do_throw("showUpdateAvailable should not have called openWindow!");
-}
-
-const WindowWatcher = {
-  openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
-    gCheckFunc();
-  },
-
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
-};
-
-const WindowMediator = {
-  getMostRecentWindow: function(aWindowType) {
-    do_execute_soon(check_status);
-    return { getInterface: XPCOMUtils.generateQI([Ci.nsIDOMWindow]) };
-  },
-
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediator])
-}
--- a/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
+++ b/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
@@ -32,11 +32,8 @@ skip-if = toolkit != 'gonk'
 skip-if = toolkit == 'gonk'
 reason = custom nsIUpdatePrompt
 [uiOnlyAllowOneWindow.js]
 skip-if = toolkit == 'gonk'
 reason = custom nsIUpdatePrompt
 [uiUnsupportedAlreadyNotified.js]
 skip-if = toolkit == 'gonk'
 reason = custom nsIUpdatePrompt
-[uiAutoPref.js]
-skip-if = toolkit == 'gonk'
-reason = custom nsIUpdatePrompt