Bug 1182352 test code - Remove custom cert check code from app update. r=mhowell
authorRobert Strong <robert.bugzilla@gmail.com>
Thu, 18 Aug 2016 10:34:28 -0700
changeset 353643 4b648a542bfbc69a748abf9025cdc77cadac6865
parent 353642 1bf5bb2dc20db8b8c3634f414d3cb7361c08da9f
child 353644 b717faf86fe742a3f618ba217339d5dfae050b75
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhowell
bugs1182352
milestone51.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 1182352 test code - Remove custom cert check code from app update. r=mhowell
toolkit/mozapps/update/tests/chrome/chrome.ini
toolkit/mozapps/update/tests/chrome/test_0121_check_requireBuiltinCert.xul
toolkit/mozapps/update/tests/chrome/test_0122_check_allowNonBuiltinCert_validCertAttrs.xul
toolkit/mozapps/update/tests/chrome/test_0123_check_allowNonBuiltinCert_noCertAttrsCheck.xul
toolkit/mozapps/update/tests/chrome/test_0131_check_invalidCertAttrs_noUpdate.xul
toolkit/mozapps/update/tests/chrome/test_0132_check_invalidCertAttrs_hasUpdate.xul
toolkit/mozapps/update/tests/chrome/test_0141_notify_invalidCertAttrs_noUpdate.xul
toolkit/mozapps/update/tests/chrome/test_0142_notify_invalidCertAttrs_hasUpdate.xul
toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul
toolkit/mozapps/update/tests/chrome/utils.js
toolkit/mozapps/update/tests/data/shared.js
--- a/toolkit/mozapps/update/tests/chrome/chrome.ini
+++ b/toolkit/mozapps/update/tests/chrome/chrome.ini
@@ -49,23 +49,16 @@ reason = only Windows has the maintenanc
 skip-if = asan
 reason = Bug 1168003
 [test_0103_background_restartNotification_stagingService.xul]
 skip-if = os != 'win'
 reason = only Windows has the maintenance service.
 [test_0111_neverButton_basic.xul]
 [test_0112_neverButton_billboard.xul]
 [test_0113_showNeverForVersionRemovedWithPref.xul]
-[test_0121_check_requireBuiltinCert.xul]
-[test_0122_check_allowNonBuiltinCert_validCertAttrs.xul]
-[test_0123_check_allowNonBuiltinCert_noCertAttrsCheck.xul]
-[test_0131_check_invalidCertAttrs_noUpdate.xul]
-[test_0132_check_invalidCertAttrs_hasUpdate.xul]
-[test_0141_notify_invalidCertAttrs_noUpdate.xul]
-[test_0142_notify_invalidCertAttrs_hasUpdate.xul]
 [test_0151_notify_backgroundCheckError.xul]
 [test_0152_notify_backgroundCheckOfflineRetry.xul]
 [test_0161_check_unsupported.xul]
 [test_0162_notify_unsupported.xul]
 [test_0171_check_noPerms_manual.xul]
 skip-if = os != 'win'
 reason = test must be able to prevent file deletion.
 [test_0172_notify_noPerms_manual.xul]
deleted file mode 100644
--- a/toolkit/mozapps/update/tests/chrome/test_0121_check_requireBuiltinCert.xul
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test update check with certificate that is not built-in and valid certificate attribute names and values"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="runTestDefault();">
-<script type="application/javascript"
-        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
-        src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
-  pageid: PAGEID_CHECKING
-}, {
-  pageid: PAGEID_ERRORS,
-  buttonClick: "finish"
-} ];
-
-Cu.import("resource://gre/modules/CertUtils.jsm");
-
-const CERT_ATTRS = ["nickname", "emailAddress", "subjectName", "commonName",
-                    "organization", "organizationalUnit", "sha1Fingerprint",
-                    "sha256Fingerprint", "tokenName", "issuerName", "serialNumber",
-                    "issuerCommonName", "issuerOrganization",
-                    "issuerOrganizationUnit", "dbKey", "windowTitle"];
-
-var gRequest;
-
-function runTest() {
-  debugDump("entering");
-
-  gRequest = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
-             createInstance(Ci.nsIXMLHttpRequest);
-  gRequest.open("GET", "https://example.com/", true);
-  gRequest.channel.notificationCallbacks = new BadCertHandler(true);
-  gRequest.onload = function(event) { testXHRLoad(event); };
-  gRequest.onerror = function(event) { testXHRError(event); };
-  gRequest.send(null);
-}
-
-function testXHRError(aEvent) {
-  debugDump("entering");
-
-  ok(true, "Entering testXHRError - something went wrong");
-
-  let request = aEvent.target;
-  let status = 0;
-  try {
-    status = request.status;
-  }
-  catch (e) {
-  }
-
-  if (status == 0) {
-    status = request.channel.QueryInterface(Ci.nsIRequest).status;
-  }
-
-  ok(false, "XHR onerror called: " + status);
-
-  gRequest = null;
-  finishTestDefault();
-}
-
-function testXHRLoad(aEvent) {
-  debugDump("entering");
-
-  let channel = aEvent.target.channel;
-  let cert = channel.securityInfo.QueryInterface(Ci.nsISSLStatusProvider).
-             SSLStatus.QueryInterface(Ci.nsISSLStatus).serverCert;
-  CERT_ATTRS.forEach(function(aCertAttrName) {
-    Services.prefs.setCharPref(PREFBRANCH_APP_UPDATE_CERTS + "1." +
-                               aCertAttrName, cert[aCertAttrName]);
-  });
-
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN, true);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES, false);
-
-  let url = URL_HTTPS_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  gAppUpdateURLDefault = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_URL);
-  debugDump("setting default pref " + PREF_APP_UPDATE_URL + " to " + url);
-  gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
-
-  gRequest = null;
-  gUP.checkForUpdates();
-}
-
-function finishTest() {
-  if (gRequest) {
-    gRequest.abort();
-    gRequest = null;
-  }
-  finishTestDefault();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-  <p id="display"></p>
-  <div id="content" style="display: none"></div>
-  <pre id="test"></pre>
-</body>
-</window>
deleted file mode 100644
--- a/toolkit/mozapps/update/tests/chrome/test_0122_check_allowNonBuiltinCert_validCertAttrs.xul
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test update check without requiring a certificate that is built-in and valid certificate attribute names and values"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="runTestDefault();">
-<script type="application/javascript"
-        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
-        src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
-  pageid: PAGEID_CHECKING
-}, {
-  pageid: PAGEID_FOUND_BASIC,
-  buttonClick: "extra1"
-} ];
-
-Cu.import("resource://gre/modules/CertUtils.jsm");
-
-const CERT_ATTRS = ["nickname", "emailAddress", "subjectName", "commonName",
-                    "organization", "organizationalUnit", "sha1Fingerprint",
-                    "sha256Fingerprint", "tokenName", "issuerName", "serialNumber",
-                    "issuerCommonName", "issuerOrganization",
-                    "issuerOrganizationUnit", "dbKey", "windowTitle"];
-
-var gRequest;
-
-function runTest() {
-  debugDump("entering");
-
-  gRequest = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
-             createInstance(Ci.nsIXMLHttpRequest);
-  gRequest.open("GET", "https://example.com/", true);
-  gRequest.channel.notificationCallbacks = new BadCertHandler(true);
-  gRequest.onload = function(event) { testXHRLoad(event); };
-  gRequest.onerror = function(event) { testXHRError(event); };
-  gRequest.send(null);
-}
-
-function testXHRError(aEvent) {
-  debugDump("entering");
-
-  ok(true, "Entering testXHRError - something went wrong");
-
-  let request = aEvent.target;
-  let status = 0;
-  try {
-    status = request.status;
-  }
-  catch (e) {
-  }
-
-  if (status == 0) {
-    status = request.channel.QueryInterface(Ci.nsIRequest).status;
-  }
-
-  ok(false, "XHR onerror called: " + status);
-
-  gRequest = null;
-  finishTestDefault();
-}
-
-function testXHRLoad(aEvent) {
-  debugDump("entering");
-
-  let channel = aEvent.target.channel;
-  let cert = channel.securityInfo.QueryInterface(Ci.nsISSLStatusProvider).
-             SSLStatus.QueryInterface(Ci.nsISSLStatus).serverCert;
-  CERT_ATTRS.forEach(function(aCertAttrName) {
-    Services.prefs.setCharPref(PREFBRANCH_APP_UPDATE_CERTS + "1." +
-                               aCertAttrName, cert[aCertAttrName]);
-  });
-
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN, false);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES, true);
-
-  let url = URL_HTTPS_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  gAppUpdateURLDefault = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_URL);
-  debugDump("setting default pref " + PREF_APP_UPDATE_URL + " to " + url);
-  gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
-
-  gRequest = null;
-  gUP.checkForUpdates();
-}
-
-function finishTest() {
-  if (gRequest) {
-    gRequest.abort();
-    gRequest = null;
-  }
-  finishTestDefault();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-  <p id="display"></p>
-  <div id="content" style="display: none"></div>
-  <pre id="test"></pre>
-</body>
-</window>
deleted file mode 100644
--- a/toolkit/mozapps/update/tests/chrome/test_0123_check_allowNonBuiltinCert_noCertAttrsCheck.xul
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test update check without requiring a certificate that is built-in and without the certificate attribute check"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="runTestDefault();">
-<script type="application/javascript"
-        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
-        src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
-  pageid: PAGEID_CHECKING
-}, {
-  pageid: PAGEID_FOUND_BASIC,
-  buttonClick: "extra1"
-} ];
-
-Cu.import("resource://gre/modules/CertUtils.jsm");
-
-function runTest() {
-  debugDump("entering");
-
-  Services.prefs.setCharPref(PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME,
-                             "Invalid Attribute Name");
-  Services.prefs.setIntPref(PREF_APP_UPDATE_CERT_ERRORS, 1);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN, false);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES, false);
-
-  let url = URL_HTTPS_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  gAppUpdateURLDefault = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_URL);
-  debugDump("setting default pref " + PREF_APP_UPDATE_URL + " to " + url);
-  gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
-
-  gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-  <p id="display"></p>
-  <div id="content" style="display: none"></div>
-  <pre id="test"></pre>
-</body>
-</window>
deleted file mode 100644
--- a/toolkit/mozapps/update/tests/chrome/test_0131_check_invalidCertAttrs_noUpdate.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test update check with invalid certificate attribute name with no update"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="runTestDefault();">
-<script type="application/javascript"
-        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
-        src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
-  pageid: PAGEID_CHECKING
-}, {
-  pageid: PAGEID_ERROR_EXTRA,
-  extraDelayedCheckFunction: checkErrorExtraPage,
-  shouldBeHidden: false,
-  displayedTextElem: "errorCertCheckNoUpdateLabel",
-  buttonClick: "finish"
-} ];
-
-function runTest() {
-  debugDump("entering");
-
-  Services.prefs.setCharPref(PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME,
-                             "Invalid Attribute Name");
-  Services.prefs.setIntPref(PREF_APP_UPDATE_CERT_ERRORS, 1);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN, false);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES, true);
-
-  let url = URL_HTTPS_UPDATE_XML + "?noUpdates=1";
-  gAppUpdateURLDefault = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_URL);
-  debugDump("setting default pref " + PREF_APP_UPDATE_URL + " to " + url);
-  gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
-
-  gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-  <p id="display"></p>
-  <div id="content" style="display: none"></div>
-  <pre id="test"></pre>
-</body>
-</window>
deleted file mode 100644
--- a/toolkit/mozapps/update/tests/chrome/test_0132_check_invalidCertAttrs_hasUpdate.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test update check with invalid certificate attribute name with an update"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="runTestDefault();">
-<script type="application/javascript"
-        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
-        src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
-  pageid: PAGEID_CHECKING
-}, {
-  pageid: PAGEID_ERROR_EXTRA,
-  extraDelayedCheckFunction: checkErrorExtraPage,
-  shouldBeHidden: true,
-  displayedTextElem: "errorCertAttrHasUpdateLabel",
-  buttonClick: "finish"
-} ];
-
-function runTest() {
-  debugDump("entering");
-
-  Services.prefs.setCharPref(PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME,
-                             "Invalid Attribute Name");
-  Services.prefs.setIntPref(PREF_APP_UPDATE_CERT_ERRORS, 1);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN, false);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES, true);
-
-  let url = URL_HTTPS_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  gAppUpdateURLDefault = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_URL);
-  debugDump("setting default pref " + PREF_APP_UPDATE_URL + " to " + url);
-  gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
-
-  gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-  <p id="display"></p>
-  <div id="content" style="display: none"></div>
-  <pre id="test"></pre>
-</body>
-</window>
deleted file mode 100644
--- a/toolkit/mozapps/update/tests/chrome/test_0141_notify_invalidCertAttrs_noUpdate.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test notification with invalid certificate attribute name with no update"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="runTestDefault();">
-<script type="application/javascript"
-        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
-        src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
-  pageid: PAGEID_ERROR_EXTRA,
-  extraDelayedCheckFunction: checkErrorExtraPage,
-  shouldBeHidden: false,
-  displayedTextElem: "errorCertCheckNoUpdateLabel",
-  buttonClick: "finish"
-} ];
-
-function runTest() {
-  debugDump("entering");
-
-  Services.prefs.setCharPref(PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME,
-                             "Invalid Attribute Name");
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN, false);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES, true);
-
-  let url = URL_HTTPS_UPDATE_XML + "?noUpdates=1";
-  gAppUpdateURLDefault = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_URL);
-  debugDump("setting default pref " + PREF_APP_UPDATE_URL + " to " + url);
-  gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
-
-  errorsPrefObserver.init(PREF_APP_UPDATE_CERT_ERRORS,
-                          PREF_APP_UPDATE_CERT_MAXERRORS);
-
-  gAUS.notify(null);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-  <p id="display"></p>
-  <div id="content" style="display: none"></div>
-  <pre id="test"></pre>
-</body>
-</window>
deleted file mode 100644
--- a/toolkit/mozapps/update/tests/chrome/test_0142_notify_invalidCertAttrs_hasUpdate.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test notification with invalid certificate attribute name with no update"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="runTestDefault();">
-<script type="application/javascript"
-        src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
-        src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
-  pageid: PAGEID_ERROR_EXTRA,
-  extraDelayedCheckFunction: checkErrorExtraPage,
-  shouldBeHidden: true,
-  displayedTextElem: "errorCertAttrHasUpdateLabel",
-  buttonClick: "finish"
-} ];
-
-function runTest() {
-  debugDump("entering");
-
-  Services.prefs.setCharPref(PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME,
-                             "Invalid Attribute Name");
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN, false);
-  Services.prefs.setBoolPref(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES, true);
-
-  let url = URL_HTTPS_UPDATE_XML + "?showDetails=1" + getVersionParams();
-  gAppUpdateURLDefault = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_URL);
-  debugDump("setting default pref " + PREF_APP_UPDATE_URL + " to " + url);
-  gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
-
-  errorsPrefObserver.init(PREF_APP_UPDATE_CERT_ERRORS,
-                          PREF_APP_UPDATE_CERT_MAXERRORS);
-
-  gAUS.notify(null);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-  <p id="display"></p>
-  <div id="content" style="display: none"></div>
-  <pre id="test"></pre>
-</body>
-</window>
--- a/toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul
+++ b/toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul
@@ -18,17 +18,17 @@
 
 <script type="application/javascript">
 <![CDATA[
 
 const TESTS = [ {
   pageid: PAGEID_ERROR_EXTRA,
   extraDelayedCheckFunction: checkErrorExtraPage,
   shouldBeHidden: false,
-  displayedTextElem: "genericBackgroundErrorLabel",
+  displayedTextElem: "bgErrorLabel",
   buttonClick: "finish"
 } ];
 
 function runTest() {
   debugDump("entering");
 
   let url = URL_HTTP_UPDATE_XML + "?xmlMalformed=1";
   setUpdateURLOverride(url);
--- a/toolkit/mozapps/update/tests/chrome/utils.js
+++ b/toolkit/mozapps/update/tests/chrome/utils.js
@@ -644,41 +644,35 @@ function checkPrefHasUserValue(aPrefHasV
   let prefHasUserValue = aPrefHasValue === undefined ? gTest.prefHasUserValue
                                                      : aPrefHasValue;
   is(Services.prefs.prefHasUserValue(gPrefToCheck), prefHasUserValue,
      "Checking prefHasUserValue for preference " + gPrefToCheck + " equals " +
      (prefHasUserValue ? "true" : "false"));
 }
 
 /**
- * Checks whether the link is hidden (general background update check error or
- * a certificate attribute check error with an update) or not (certificate
- * attribute check error without an update) on the errorextra page and that the
- * app.update.cert.errors and app.update.backgroundErrors preferences do not
- & have a user value.
+ * Checks whether the link is hidden for a general background update check error
+ * or not on the errorextra page and that the app.update.backgroundErrors
+ * preference does not have a user value.
  *
  * @param  aShouldBeHidden (optional)
  *         The expected value for the label's hidden attribute for the link. If
  *         aShouldBeHidden is undefined the value of the current test's
  *         shouldBeHidden property will be used.
  */
 function checkErrorExtraPage(aShouldBeHidden) {
   let shouldBeHidden = aShouldBeHidden === undefined ? gTest.shouldBeHidden
                                                      : aShouldBeHidden;
   is(gWin.document.getElementById("errorExtraLinkLabel").hidden, shouldBeHidden,
      "Checking errorExtraLinkLabel hidden attribute equals " +
      (shouldBeHidden ? "true" : "false"));
 
   is(gWin.document.getElementById(gTest.displayedTextElem).hidden, false,
      "Checking " + gTest.displayedTextElem + " should not be hidden");
 
-  ok(!Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CERT_ERRORS),
-     "Preference " + PREF_APP_UPDATE_CERT_ERRORS + " should not have a " +
-     "user value");
-
   ok(!Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS),
      "Preference " + PREF_APP_UPDATE_BACKGROUNDERRORS + " should not have a " +
      "user value");
 }
 
 /**
  * Gets the update version info for the update url parameters to send to
  * update.sjs.
@@ -988,53 +982,28 @@ function resetPrefs() {
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_LOG)) {
     Services.prefs.clearUserPref(PREF_APP_UPDATE_LOG);
   }
 
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_SILENT)) {
     Services.prefs.clearUserPref(PREF_APP_UPDATE_SILENT);
   }
 
-  if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CERT_ERRORS)) {
-    Services.prefs.clearUserPref(PREF_APP_UPDATE_CERT_ERRORS);
-  }
-
-  if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CERT_MAXERRORS)) {
-    Services.prefs.clearUserPref(PREF_APP_UPDATE_CERT_MAXERRORS);
-  }
-
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS)) {
     Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDERRORS);
   }
 
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDMAXERRORS)) {
     Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDMAXERRORS);
   }
 
-  if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME)) {
-    Services.prefs.clearUserPref(PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME);
-  }
-
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CERT_REQUIREBUILTIN)) {
     Services.prefs.clearUserPref(PREF_APP_UPDATE_CERT_REQUIREBUILTIN);
   }
 
-  if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES)) {
-    Services.prefs.clearUserPref(PREF_APP_UPDATE_CERT_CHECKATTRIBUTES);
-  }
-
-  try {
-    CERT_ATTRS.forEach(function(aCertAttrName) {
-      Services.prefs.clearUserPref(PREFBRANCH_APP_UPDATE_CERTS + "1." +
-                                   aCertAttrName);
-    });
-  }
-  catch (e) {
-  }
-
   try {
     Services.prefs.deleteBranch(PREFBRANCH_APP_UPDATE_NEVER);
   }
   catch (e) {
   }
 }
 
 function setupTimer(aTestTimeout) {
@@ -1088,17 +1057,17 @@ const errorsPrefObserver = {
    * Sets up a preference observer and sets the associated maximum errors
    * preference used for background notification.
    *
    * @param  aObservePref
    *         The preference to observe.
    * @param  aMaxErrorPref
    *         The maximum errors preference.
    * @param  aMaxErrorCount
-   *         The value to set the app.update.cert.maxErrors preference to.
+   *         The value to set the maximum errors preference to.
    */
   init: function(aObservePref, aMaxErrorPref, aMaxErrorCount) {
     this.observedPref = aObservePref;
     this.maxErrorPref = aMaxErrorPref;
 
     let maxErrors = aMaxErrorCount ? aMaxErrorCount : 2;
     Services.prefs.setIntPref(aMaxErrorPref, maxErrors);
     Services.prefs.addObserver(aObservePref, this, false);
--- a/toolkit/mozapps/update/tests/data/shared.js
+++ b/toolkit/mozapps/update/tests/data/shared.js
@@ -5,41 +5,34 @@
 /* Shared code for xpcshell and mochitests-chrome */
 
 Cu.import("resource://gre/modules/FileUtils.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const PREF_APP_UPDATE_AUTO                 = "app.update.auto";
 const PREF_APP_UPDATE_BACKGROUNDERRORS     = "app.update.backgroundErrors";
 const PREF_APP_UPDATE_BACKGROUNDMAXERRORS  = "app.update.backgroundMaxErrors";
-const PREF_APP_UPDATE_CERT_CHECKATTRIBUTES = "app.update.cert.checkAttributes";
-const PREF_APP_UPDATE_CERT_ERRORS          = "app.update.cert.errors";
-const PREF_APP_UPDATE_CERT_MAXERRORS       = "app.update.cert.maxErrors";
 const PREF_APP_UPDATE_CERT_REQUIREBUILTIN  = "app.update.cert.requireBuiltIn";
 const PREF_APP_UPDATE_CHANNEL              = "app.update.channel";
 const PREF_APP_UPDATE_ENABLED              = "app.update.enabled";
 const PREF_APP_UPDATE_IDLETIME             = "app.update.idletime";
 const PREF_APP_UPDATE_LOG                  = "app.update.log";
 const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED  = "app.update.notifiedUnsupported";
 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_CERTS = "app.update.certs.";
 const PREFBRANCH_APP_UPDATE_NEVER = "app.update.never.";
 
-const PREF_APP_UPDATE_CERT_INVALID_ATTR_NAME = PREFBRANCH_APP_UPDATE_CERTS +
-                                               "1.invalidName";
-
 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";
 
 const NS_APP_PROFILE_DIR_STARTUP   = "ProfDS";
 const NS_APP_USER_PROFILE_50_DIR   = "ProfD";
 const NS_GRE_DIR                   = "GreD";