Backed out changeset 944ffb76f335 (bug 1640072) for perma failures on browser_protections_lockwise.js. CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Thu, 28 May 2020 01:43:32 +0300
changeset 596360 cfa4bd8e6f789fcca1de2272f0d5b11c0ded913f
parent 596359 a8e1d6e554e5431dbb7e9d313833936c4e876c12
child 596361 3981937b9da4ffbffe181ce7b0a305a2f02abf71
push id13186
push userffxbld-merge
push dateMon, 01 Jun 2020 09:52:46 +0000
treeherdermozilla-beta@3e7c70a1e4a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1640072
milestone78.0a1
backs out944ffb76f3356bebbc8761e10c924ea9e8899ad7
first release with
nightly linux32
cfa4bd8e6f78 / 78.0a1 / 20200528032513 / files
nightly linux64
cfa4bd8e6f78 / 78.0a1 / 20200528032513 / files
nightly mac
cfa4bd8e6f78 / 78.0a1 / 20200528032513 / files
nightly win32
cfa4bd8e6f78 / 78.0a1 / 20200528032513 / files
nightly win64
cfa4bd8e6f78 / 78.0a1 / 20200528032513 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 944ffb76f335 (bug 1640072) for perma failures on browser_protections_lockwise.js. CLOSED TREE
browser/components/protections/content/monitor-card.js
browser/locales/en-US/browser/protections.ftl
--- a/browser/components/protections/content/monitor-card.js
+++ b/browser/components/protections/content/monitor-card.js
@@ -137,78 +137,83 @@ export default class MonitorClass {
       : MONITOR_URL;
   }
 
   renderContentForUserWithAccount(monitorData) {
     const {
       numBreaches,
       numBreachesResolved,
       passwords,
-      passwordsResolved,
       monitoredEmails,
     } = monitorData;
     const monitorCardBody = this.doc.querySelector(
       ".card.monitor-card .card-body"
     );
     monitorCardBody.classList.remove("hidden");
 
     const howItWorksLink = this.doc.getElementById("monitor-link");
     howItWorksLink.href = HOW_IT_WORKS_URL_PREF;
 
     const storedEmail = this.doc.querySelector(
       "span[data-type='stored-emails']"
     );
-    storedEmail.textContent = monitoredEmails;
-    const infoMonitoredAddresses = this.doc.getElementById(
-      "info-monitored-addresses"
-    );
-    this.doc.l10n.setAttributes(
-      infoMonitoredAddresses,
-      "info-monitored-emails",
-      { count: monitoredEmails }
-    );
-
     const knownBreaches = this.doc.querySelector(
       "span[data-type='known-breaches']"
     );
     const exposedPasswords = this.doc.querySelector(
       "span[data-type='exposed-passwords']"
     );
+    storedEmail.textContent = monitoredEmails;
+    knownBreaches.textContent = numBreaches;
+    exposedPasswords.textContent = passwords;
+
+    const infoMonitoredAddresses = this.doc.getElementById(
+      "info-monitored-addresses"
+    );
+    infoMonitoredAddresses.setAttribute(
+      "data-l10n-args",
+      JSON.stringify({ count: monitoredEmails })
+    );
+    infoMonitoredAddresses.setAttribute(
+      "data-l10n-id",
+      "info-monitored-emails"
+    );
 
     const infoKnownBreaches = this.doc.getElementById("info-known-breaches");
+    infoKnownBreaches.setAttribute(
+      "data-l10n-args",
+      JSON.stringify({ count: numBreaches })
+    );
+    infoKnownBreaches.setAttribute("data-l10n-id", "info-known-breaches-found");
+
     const infoExposedPasswords = this.doc.getElementById(
       "info-exposed-passwords"
     );
+    infoExposedPasswords.setAttribute(
+      "data-l10n-args",
+      JSON.stringify({ count: passwords })
+    );
+    infoExposedPasswords.setAttribute(
+      "data-l10n-id",
+      "info-exposed-passwords-found"
+    );
 
     const breachesWrapper = this.doc.querySelector(".monitor-breaches-wrapper");
     const partialBreachesWrapper = this.doc.querySelector(
       ".monitor-partial-breaches-wrapper"
     );
     const breachesTitle = this.doc.getElementById("monitor-breaches-title");
     const breachesIcon = this.doc.getElementById("monitor-breaches-icon");
     const breachesDesc = this.doc.getElementById(
       "monitor-breaches-description"
     );
     const breachesLink = this.doc.getElementById("monitor-breaches-link");
     if (numBreaches) {
       if (!numBreachesResolved) {
         partialBreachesWrapper.classList.add("hidden");
-        knownBreaches.textContent = numBreaches;
-        this.doc.l10n.setAttributes(
-          infoKnownBreaches,
-          "info-known-breaches-found",
-          { count: numBreaches }
-        );
-        exposedPasswords.textContent = passwords;
-        this.doc.l10n.setAttributes(
-          infoExposedPasswords,
-          "info-exposed-passwords-found",
-          { count: passwords }
-        );
-
         breachesIcon.setAttribute(
           "src",
           "chrome://browser/skin/protections/new-feature.svg"
         );
         breachesTitle.setAttribute(
           "data-l10n-id",
           "monitor-breaches-unresolved-title"
         );
@@ -218,59 +223,31 @@ export default class MonitorClass {
         );
         breachesLink.setAttribute(
           "data-l10n-id",
           "monitor-manage-breaches-link"
         );
         breachesLink.classList.add("no-breaches-resolved");
       } else if (numBreaches == numBreachesResolved) {
         partialBreachesWrapper.classList.add("hidden");
-        knownBreaches.textContent = numBreachesResolved;
-        this.doc.l10n.setAttributes(
-          infoKnownBreaches,
-          "info-known-breaches-resolved",
-          { count: numBreachesResolved }
-        );
-        let unresolvedPasswords = passwords - passwordsResolved;
-        exposedPasswords.textContent = unresolvedPasswords;
-        this.doc.l10n.setAttributes(
-          infoExposedPasswords,
-          "info-exposed-passwords-resolved",
-          { count: unresolvedPasswords }
-        );
-
         breachesIcon.setAttribute(
           "src",
           "chrome://browser/skin/protections/resolved-breach.svg"
         );
         breachesTitle.setAttribute(
           "data-l10n-id",
           "monitor-breaches-resolved-title"
         );
         breachesDesc.setAttribute(
           "data-l10n-id",
           "monitor-breaches-resolved-description"
         );
         breachesLink.setAttribute("data-l10n-id", "monitor-view-report-link");
       } else {
         breachesWrapper.classList.add("hidden");
-        knownBreaches.textContent = numBreachesResolved;
-        this.doc.l10n.setAttributes(
-          infoKnownBreaches,
-          "info-known-breaches-resolved",
-          { count: numBreachesResolved }
-        );
-        let unresolvedPasswords = passwords - passwordsResolved;
-        exposedPasswords.textContent = unresolvedPasswords;
-        this.doc.l10n.setAttributes(
-          infoExposedPasswords,
-          "info-exposed-passwords-resolved",
-          { count: unresolvedPasswords }
-        );
-
         const partialBreachesTitle = document.getElementById(
           "monitor-partial-breaches-title"
         );
         partialBreachesTitle.setAttribute(
           "data-l10n-args",
           JSON.stringify({
             numBreaches,
             numBreachesResolved,
@@ -333,29 +310,16 @@ export default class MonitorClass {
         partialBreachesLink.setAttribute("href", MONITOR_HOME_PAGE_URL);
         partialBreachesLink.addEventListener(
           "click",
           this.onClickMonitorButton.bind(this)
         );
       }
     } else {
       partialBreachesWrapper.classList.add("hidden");
-      knownBreaches.textContent = numBreaches;
-      this.doc.l10n.setAttributes(
-        infoKnownBreaches,
-        "info-known-breaches-found",
-        { count: numBreaches }
-      );
-      exposedPasswords.textContent = passwords;
-      this.doc.l10n.setAttributes(
-        infoExposedPasswords,
-        "info-exposed-passwords-found",
-        { count: passwords }
-      );
-
       breachesIcon.setAttribute(
         "src",
         "chrome://browser/skin/protections/resolved-breach.svg"
       );
       breachesTitle.setAttribute("data-l10n-id", "monitor-no-breaches-title");
       breachesDesc.setAttribute(
         "data-l10n-id",
         "monitor-no-breaches-description"
--- a/browser/locales/en-US/browser/protections.ftl
+++ b/browser/locales/en-US/browser/protections.ftl
@@ -133,42 +133,24 @@ info-monitored-emails =
 # your localization, because it would result in the number showing twice.
 info-known-breaches-found =
   { $count ->
      [one] Known data breach has exposed your information
     *[other] Known data breaches have exposed your information
   }
 
 # This string is displayed after a large numeral that indicates the total number
-# of known data breaches that are marked as resolved by the user. Don’t add $count
-# to your localization, because it would result in the number showing twice.
-info-known-breaches-resolved =
-  { $count ->
-     [one] Known data breach marked as resolved
-    *[other] Known data breaches marked as resolved
-  }
-
-# This string is displayed after a large numeral that indicates the total number
 # of exposed passwords. Don’t add $count to
 # your localization, because it would result in the number showing twice.
 info-exposed-passwords-found =
   { $count ->
      [one] Password exposed across all breaches
     *[other] Passwords exposed across all breaches
   }
 
-# This string is displayed after a large numeral that indicates the total number
-# of exposed passwords that are marked as resolved by the user. Don’t add $count
-# to your localization, because it would result in the number showing twice.
-info-exposed-passwords-resolved =
-  { $count ->
-     [one] Password exposed in unresolved breaches
-    *[other] Passwords exposed in unresolved breaches
-  }
-
 monitor-no-breaches-title = Good news!
 monitor-no-breaches-description = You have no known breaches. If that changes, we will let you know.
 monitor-view-report-link = View Report
   .title = Resolve breaches on { -monitor-brand-short-name }
 monitor-breaches-unresolved-title = Resolve your breaches
 monitor-breaches-unresolved-description = After reviewing breach details and taking steps to protect your info, you can mark breaches as resolved.
 monitor-manage-breaches-link = Manage Breaches
   .title = Manage breaches on { -monitor-brand-short-name }