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 522380 b12dda048dd5b1d0bed3d3e0cb7387c4cb6b66cf
parent 522379 1b9bfa6dab28e2824ea695dedc76f64e0636d0f3
child 522381 786be6f1f8e0ede952a00e55132648950a30b44b
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [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);
 });