Bug 1484440 - Set browser.security.newcerterrorpage.enabled for exception dialog button test r=johannh
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 22 Aug 2018 15:25:17 +0000
changeset 481237 878d4534b8877d298299f3473f0630858ad56fb5
parent 481236 ed054a84c6a3ad17821235ff1053930d87583d9e
child 481238 e635f336c727db6e34b09184b42feb2879f3622b
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewersjohannh
bugs1484440
milestone63.0a1
Bug 1484440 - Set browser.security.newcerterrorpage.enabled for exception dialog button test r=johannh Differential Revision: https://phabricator.services.mozilla.com/D3965
browser/base/content/test/about/browser_aboutCertError.js
--- a/browser/base/content/test/about/browser_aboutCertError.js
+++ b/browser/base/content/test/about/browser_aboutCertError.js
@@ -80,16 +80,17 @@ add_task(async function checkReturnToAbo
     is(browser.webNavigation.canGoForward, false, "!webNavigation.canGoForward");
     is(gBrowser.currentURI.spec, "about:home", "Went back");
 
     BrowserTestUtils.removeTab(gBrowser.selectedTab);
   }
 });
 
 add_task(async function checkExceptionDialogButton() {
+  Services.prefs.setBoolPref("browser.security.newcerterrorpage.enabled", true);
   info("Loading a bad cert page and making sure the exceptionDialogButton directly adds an exception");
   let tab = await openErrorPage(BAD_CERT);
   let browser = tab.linkedBrowser;
   let loaded = BrowserTestUtils.browserLoaded(browser, false, BAD_CERT);
   info("Clicking the exceptionDialogButton in advanced panel");
   await ContentTask.spawn(browser, null, async function() {
     let doc = content.document;
     let exceptionButton = doc.getElementById("exceptionDialogButton");
@@ -103,16 +104,17 @@ add_task(async function checkExceptionDi
     let doc = content.document;
     ok(!doc.documentURI.startsWith("about:certerror"), "Exception has been added");
   });
 
   let certOverrideService = Cc["@mozilla.org/security/certoverride;1"]
                               .getService(Ci.nsICertOverrideService);
   certOverrideService.clearValidityOverride("expired.example.com", -1);
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
+  Services.prefs.clearUserPref("browser.security.newcerterrorpage.enabled");
 });
 
 add_task(async function checkReturnToPreviousPage() {
   info("Loading a bad cert page and making sure 'return to previous page' goes back");
   for (let useFrame of [false, true]) {
     let tab;
     let browser;
     if (useFrame) {