Bug 1500103 - Only test return_button_adv and exception_button for new cert error pages. r=nhnt11
authorJohann Hofmann <jhofmann@mozilla.com>
Fri, 19 Oct 2018 14:21:41 +0000
changeset 497946 776414145c58b27c8135d102d71263164f1d329f
parent 497945 b4934bce3c1eaf5e25ccda5418b174c620dac845
child 497947 c05cdb233b60f923e667a9a6729e14e4a2dbbda0
push id10016
push userrgurzau@mozilla.com
push dateMon, 22 Oct 2018 13:58:55 +0000
treeherdermozilla-beta@848cf6354160 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnhnt11
bugs1500103
milestone64.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 1500103 - Only test return_button_adv and exception_button for new cert error pages. r=nhnt11 exception_button can technically be clicked on the old error pages, too, but conditionally checking for the cert exception window to pop up is a bit overkill for this temporary workaround. Ideally we would remove this pref soon anyway. Differential Revision: https://phabricator.services.mozilla.com/D9243
browser/base/content/test/about/browser_aboutCertError_telemetry.js
--- a/browser/base/content/test/about/browser_aboutCertError_telemetry.js
+++ b/browser/base/content/test/about/browser_aboutCertError_telemetry.js
@@ -46,21 +46,23 @@ add_task(async function checkTelemetryCl
     let recordedObjects = [
       "advanced_button",
       "learn_more_link",
       "auto_report_cb",
       "error_code_link",
       "clipboard_button_top",
       "clipboard_button_bot",
       "return_button_top",
-      "return_button_adv",
     ];
 
-    if (!useFrame) {
-      recordedObjects.push("exception_button");
+    if (Services.prefs.getBoolPref("browser.security.newcerterrorpage.enabled")) {
+      recordedObjects.push("return_button_adv");
+      if (!useFrame) {
+        recordedObjects.push("exception_button");
+      }
     }
 
     for (let object of recordedObjects) {
       let tab = await openErrorPage(BAD_CERT, useFrame);
       let browser = tab.linkedBrowser;
 
       let loadEvents = await TestUtils.waitForCondition(() => {
         let events = Services.telemetry.snapshotEvents(