Bug 1535666 - Explicitly turn on new cert error pages in browser_aboutCertError_noSubjectAltName.js to let it pass on beta r=Gijs a=test-only
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 18 Mar 2019 15:27:16 +0000
changeset 525624 d15b22ef4b88a6be3e0adaf3163022e61fe3e275
parent 525623 faf2b7dc8a6e6cc7f2b99979599674ee8cd36f4c
child 525625 cb4eac8d65949e75804cfc6f373a844961c6ec31
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, test-only
bugs1535666
milestone67.0
Bug 1535666 - Explicitly turn on new cert error pages in browser_aboutCertError_noSubjectAltName.js to let it pass on beta r=Gijs a=test-only 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 BROWSER_NAME = document.getElementById("bundle_brand").getString("brandShortName");
 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");
@@ -25,18 +26,18 @@ const checkAdvancedAndGetTechnicalInfoTe
   let viewCertificate = doc.getElementById("viewCertificate");
   ok(viewCertificate, "viewCertificate found");
 
   return badCertTechnicalInfo.innerHTML;
 };
 
 const checkCorrectMessages = (message) => {
   let isCorrectMessage =
-    message.includes("Websites prove their identity via certificates."
-      + " Nightly does not trust this site because it uses a certificate that is"
+    message.includes("Websites prove their identity via certificates. "
+      + BROWSER_NAME + " does not trust this site because it uses a certificate that is"
       + " 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() {