Bug 1535666 - Explicitly turn on new cert error pages in browser_aboutCertError_noSubjectAltName.js to let it pass on beta r=Gijs
☠☠ backed out by 55935c0cdcb4 ☠ ☠
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 15 Mar 2019 22:45:46 +0000
changeset 464485 b12dda048dd5
parent 464484 1b9bfa6dab28
child 464486 786be6f1f8e0
push id35716
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:42:17 +0000
treeherdermozilla-central@8ee97c045359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1535666
milestone67.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 1535666 - Explicitly turn on new cert error pages in browser_aboutCertError_noSubjectAltName.js to let it pass on beta r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D23728
browser/base/content/test/about/browser_aboutCertError_noSubjectAltName.js
--- a/browser/base/content/test/about/browser_aboutCertError_noSubjectAltName.js
+++ b/browser/base/content/test/about/browser_aboutCertError_noSubjectAltName.js
@@ -1,13 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
+const PREF_NEW_CERT_ERRORS = "browser.security.newcerterrorpage.enabled";
 const UNKNOWN_ISSUER = "https://no-subject-alt-name.example.com:443";
 
 const checkAdvancedAndGetTechnicalInfoText = async () => {
   let doc = content.document;
 
   let advancedButton = doc.getElementById("advancedButton");
   ok(advancedButton, "advancedButton found");
   is(advancedButton.hasAttribute("disabled"), false, "advancedButton should be clickable");
@@ -35,17 +36,19 @@ const checkCorrectMessages = (message) =
       + " not valid for no-subject-alt-name.example.com");
   is(isCorrectMessage, true, "That message should appear");
   let isWrongMessage =
     message.includes("The certificate is only valid for ");
   is(isWrongMessage, false, "That message shouldn't appear");
 };
 
 add_task(async function checkUntrustedCertError() {
+  Services.prefs.setBoolPref(PREF_NEW_CERT_ERRORS, true);
   info(`Loading ${UNKNOWN_ISSUER} which does not have a subject specified in the certificate`);
   let tab = await openErrorPage(UNKNOWN_ISSUER);
   let browser = tab.linkedBrowser;
   info("Clicking the exceptionDialogButton in advanced panel");
   let badCertTechnicalInfoText =
     await ContentTask.spawn(browser, null, checkAdvancedAndGetTechnicalInfoText);
   checkCorrectMessages(badCertTechnicalInfoText, browser);
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
+  Services.prefs.clearUserPref(PREF_NEW_CERT_ERRORS);
 });