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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sebastian Hengst 2019-03-15 22:45:46 +00:00
Родитель db0b4a6acd
Коммит 11cbaa0ead
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -3,6 +3,7 @@
"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 () => {
@ -40,6 +41,7 @@ const checkCorrectMessages = (message) => {
};
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;
@ -48,4 +50,5 @@ add_task(async function checkUntrustedCertError() {
await ContentTask.spawn(browser, null, checkAdvancedAndGetTechnicalInfoText);
checkCorrectMessages(badCertTechnicalInfoText, browser);
BrowserTestUtils.removeTab(gBrowser.selectedTab);
Services.prefs.clearUserPref(PREF_NEW_CERT_ERRORS);
});