Backed out changeset 725ef2e2a53e (bug 1567180) for failing at /browser_protections_report_ui.js on a CLOSED TREE.
authorGurzau Raul <rgurzau@mozilla.com>
Fri, 19 Jul 2019 18:56:19 +0300
changeset 483502 86aaa1298ed03445bab82eeb6d7d11cafdeace59
parent 483501 44e8fbdf5cbd72ed09fc4589d7119c29f051ee72
child 483503 5f00d5f48cb2e58e12b4ffec5b2bfbf7766bd0a5
push id36321
push usermalexandru@mozilla.com
push dateFri, 19 Jul 2019 21:56:14 +0000
treeherdermozilla-central@23d4ebd5f8e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1567180
milestone70.0a1
backs out725ef2e2a53e6ba90304c4aefee63bc1a4440ff5
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
Backed out changeset 725ef2e2a53e (bug 1567180) for failing at /browser_protections_report_ui.js on a CLOSED TREE.
browser/base/content/logos/tracking-protection.svg
browser/base/jar.mn
browser/components/about/AboutProtectionsHandler.jsm
browser/components/protections/content/protections.css
browser/components/protections/content/protections.ftl
browser/components/protections/content/protections.html
browser/components/protections/content/protections.js
browser/components/protections/test/browser/browser_protections_report_ui.js
deleted file mode 100644
--- a/browser/base/content/logos/tracking-protection.svg
+++ /dev/null
@@ -1,1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 64 64"><linearGradient id="a" x1="11.95" x2="52.05" y1="6.9" y2="47.01" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b833e1"/><stop offset=".37" stop-color="#9059ff"/><stop offset=".61" stop-color="#5b6df8"/><stop offset="1" stop-color="#0090ed"/></linearGradient><linearGradient id="b" x1="18.54" x2="39.34" y1="19.64" y2="40.45" xlink:href="#a"/><path fill="url(#a)" d="M56 13.57a6.52 6.52 0 0 0-5.43-6.45L32 4 13.43 7.12A6.52 6.52 0 0 0 8 13.57c0 4.25 0 11.89.33 15.33.91 9.88 2.76 15.29 7.32 21.45a24.94 24.94 0 0 0 16 9.63L32 60h.33a24.94 24.94 0 0 0 16-9.63c4.56-6.16 6.41-11.57 7.32-21.45.35-3.47.35-11.11.35-15.35zm-6.31 14.78c-.81 8.85-2.25 13.15-6.16 18.42A19.25 19.25 0 0 1 32 54a19.17 19.17 0 0 1-11.53-7.19c-3.91-5.27-5.35-9.58-6.16-18.42C14.09 26 14 20.64 14 13.58a.55.55 0 0 1 .43-.55L32 10l17.57 3a.55.55 0 0 1 .43.55c0 7.08-.09 12.45-.31 14.8z"/><path fill="url(#b)" d="M20.28 27.8c.78 8.5 2.12 11.5 5 15.4A13 13 0 0 0 32 47.79V16.13l-12 2c0 4.6.13 8.06.28 9.67z"/></svg>
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -17,17 +17,16 @@ browser.jar:
         content/browser/illustrations/error-connection-failure.svg (content/illustrations/error-connection-failure.svg)
         content/browser/illustrations/error-server-not-found.svg (content/illustrations/error-server-not-found.svg)
         content/browser/illustrations/error-malformed-url.svg (content/illustrations/error-malformed-url.svg)
         content/browser/illustrations/under-construction.svg (content/illustrations/under-construction.svg)
         content/browser/illustrations/blue-berror.svg (content/illustrations/blue-berror.svg)
         content/browser/logos/lockwise.svg             (content/logos/lockwise.svg)
         content/browser/logos/lockwise-mobile-app.svg             (content/logos/lockwise-mobile-app.svg)
         content/browser/logos/monitor.svg             (content/logos/monitor.svg)
-        content/browser/logos/tracking-protection.svg (content/logos/tracking-protection.svg)
         content/browser/aboutNetError.xhtml            (content/aboutNetError.xhtml)
         content/browser/aboutNetError.js               (content/aboutNetError.js)
         content/browser/aboutRobots-icon.png          (content/aboutRobots-icon.png)
         content/browser/aboutFrameCrashed.html        (content/aboutFrameCrashed.html)
         content/browser/aboutTabCrashed.css           (content/aboutTabCrashed.css)
         content/browser/aboutTabCrashed.js            (content/aboutTabCrashed.js)
         content/browser/aboutTabCrashed.xhtml         (content/aboutTabCrashed.xhtml)
 *       content/browser/browser.css                   (content/browser.css)
--- a/browser/components/about/AboutProtectionsHandler.jsm
+++ b/browser/components/about/AboutProtectionsHandler.jsm
@@ -45,17 +45,16 @@ var AboutProtectionsHandler = {
     "FetchUserLoginsData",
     // Getting prefs
     "GetEnabledPrefs",
   ],
   _prefs: {
     LockwiseCard: "browser.contentblocking.report.lockwise.enabled",
     MonitorCard: "browser.contentblocking.report.monitor.enabled",
   },
-  PREF_CB_CATEGORY: "browser.contentblocking.category",
 
   init() {
     this.receiveMessage = this.receiveMessage.bind(this);
     this.pageListener = new RemotePages("about:protections");
     for (let topic of this._topics) {
       this.pageListener.addMessageListener(topic, this.receiveMessage);
     }
     this._inited = true;
@@ -141,19 +140,16 @@ var AboutProtectionsHandler = {
         win.openPreferences("privacy-trackingprotection", {
           origin: "about-protections",
         });
         break;
       case "OpenSyncPreferences":
         win.openTrustedLinkIn("about:preferences#sync", "tab");
         break;
       case "FetchContentBlockingEvents":
-        let category = Services.prefs.getStringPref(this.PREF_CB_CATEGORY);
-        this.sendMessage(aMessage.target, "SendCBCategory", category);
-
         let sumEvents = await TrackingDBService.sumAllEvents();
         let earliestDate = await TrackingDBService.getEarliestRecordedDate();
         let eventsByDate = await TrackingDBService.getEventsByDateRange(
           aMessage.data.from,
           aMessage.data.to
         );
         let dataToSend = {};
         let largest = 0;
--- a/browser/components/protections/content/protections.css
+++ b/browser/components/protections/content/protections.css
@@ -120,17 +120,17 @@ a.hidden,
 .icon {
   width: 60px;
   height: 60px;
   grid-column: 1;
   margin: 0 auto;
 }
 
 .etp-card .icon {
-  background: url("chrome://browser/content/logos/tracking-protection.svg") no-repeat center/cover;
+  background: url("chrome://browser/skin/controlcenter/tracking-protection.svg") no-repeat center/cover;
 }
 
 .lockwise-card .icon {
   background: url("chrome://browser/content/logos/lockwise.svg") no-repeat center/cover;
 }
 
 .monitor-card .icon {
   background: url("chrome://browser/content/logos/monitor.svg") no-repeat center/cover;
--- a/browser/components/protections/content/protections.ftl
+++ b/browser/components/protections/content/protections.ftl
@@ -18,15 +18,8 @@ graph-week-summary =
 #   $count (Number) - Number of tracking events blocked.
 #   $earliestDate (Number) - Unix timestamp in ms, representing a date. The
 # earliest date recorded in the database.
 graph-total-summary =
   { $count ->
      [one] { $count } tracker blocked since { DATETIME($earliestDate, day: "numeric", month: "long", year: "numeric") }
     *[other] { $count } trackers blocked since { DATETIME($earliestDate, day: "numeric", month: "long", year: "numeric") }
   }
-
-# The terminology used to refer to categories of Content Blocking is also used in chrome/browser/browser.properties and should be translated consistently.
-# The category name in the <b> tag will be bold.
-# "Standard" in this case is an adjective, meaning "default" or "normal".
-protection-header-details-standard = Protection Level is set to <b>Standard</b>
-protection-header-details-strict = Protection Level is set to <b>Strict</b>
-protection-header-details-custom = Protection Level is set to <b>Custom</b>
--- a/browser/components/protections/content/protections.html
+++ b/browser/components/protections/content/protections.html
@@ -26,17 +26,19 @@
           <div class="icon"></div>
           <div class="wrapper">
             <h3 class="card-title">
               Enhanced Tracking Protection
             </h3>
             <p class="content">
               Trackers follow you around online to collect information about your browsing habits and interests. Firefox blocks many of these trackers and other malicious scripts.
             </p>
-            <p id="protection-details"></p>
+            <p id="protection-details">
+              Protection Level is set to <span>Standard</span>
+            </p>
           </div>
         </div>
         <div class="card-body">
           <div class="body-wrapper">
             <p id="graph-week-summary"></p>
             <div id="graph-wrapper">
               <div id="graph"></div>
               <div id="legend">
--- a/browser/components/protections/content/protections.js
+++ b/browser/components/protections/content/protections.js
@@ -27,35 +27,16 @@ document.addEventListener("DOMContentLoa
   let protectionDetails = document.getElementById("protection-details");
   protectionDetails.addEventListener("click", () => {
     RPMSendAsyncMessage("OpenContentBlockingPreferences");
   });
 
   // Get the display prefs for each component
   RPMSendAsyncMessage("GetEnabledPrefs");
 
-  RPMAddMessageListener("SendCBCategory", message => {
-    if (message.data == "custom") {
-      protectionDetails.setAttribute(
-        "data-l10n-id",
-        "protection-header-details-custom"
-      );
-    } else if (message.data == "strict") {
-      protectionDetails.setAttribute(
-        "data-l10n-id",
-        "protection-header-details-strict"
-      );
-    } else {
-      protectionDetails.setAttribute(
-        "data-l10n-id",
-        "protection-header-details-standard"
-      );
-    }
-  });
-
   let createGraph = data => {
     let dateInMS = data.earliestDate
       ? new Date(data.earliestDate).getTime()
       : Date.now();
 
     let summary = document.getElementById("graph-total-summary");
     summary.setAttribute(
       "data-l10n-args",
--- a/browser/components/protections/test/browser/browser_protections_report_ui.js
+++ b/browser/components/protections/test/browser/browser_protections_report_ui.js
@@ -248,56 +248,8 @@ add_task(async function test_graph_displ
   // Use the TrackingDBService API to delete the data.
   await TrackingDBService.clearAll();
   // Make sure the data was deleted.
   let rows = await db.execute(SQL.selectAll);
   is(rows.length, 0, "length is 0");
   await db.close();
   BrowserTestUtils.removeTab(tab);
 });
-
-// Ensure that the string in the ETP card header is changing when we change
-// the category pref.
-add_task(async function test_etp_header_string() {
-  Services.prefs.setStringPref("browser.contentblocking.category", "standard");
-  let tab = await BrowserTestUtils.openNewForegroundTab({
-    url: "about:protections",
-    gBrowser,
-  });
-  await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
-    let l10nID = content.document
-      .querySelector("#protection-details")
-      .getAttribute("data-l10n-id");
-    is(
-      l10nID,
-      "protection-header-details-standard",
-      "The standard string is showing"
-    );
-  });
-
-  Services.prefs.setStringPref("browser.contentblocking.category", "strict");
-  await reloadTab(tab);
-  await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
-    let l10nID = content.document
-      .querySelector("#protection-details")
-      .getAttribute("data-l10n-id");
-    is(
-      l10nID,
-      "protection-header-details-strict",
-      "The strict string is showing"
-    );
-  });
-
-  Services.prefs.setStringPref("browser.contentblocking.category", "custom");
-  await reloadTab(tab);
-  await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
-    let l10nID = content.document
-      .querySelector("#protection-details")
-      .getAttribute("data-l10n-id");
-    is(
-      l10nID,
-      "protection-header-details-custom",
-      "The custom string is showing"
-    );
-  });
-
-  BrowserTestUtils.removeTab(tab);
-});