diff --git a/browser/components/about/AboutProtectionsHandler.jsm b/browser/components/about/AboutProtectionsHandler.jsm index a3b35f988ecc..1b9da18315e6 100644 --- a/browser/components/about/AboutProtectionsHandler.jsm +++ b/browser/components/about/AboutProtectionsHandler.jsm @@ -324,7 +324,9 @@ var AboutProtectionsHandler = { let win = aMessage.target.browser.ownerGlobal; switch (aMessage.name) { case "OpenAboutLogins": - win.openTrustedLinkIn("about:logins", "tab"); + LoginHelper.openPasswordManager(win, { + entryPoint: "aboutprotections", + }); break; case "OpenContentBlockingPreferences": win.openPreferences("privacy-trackingprotection", { diff --git a/browser/components/protections/content/monitor-card.js b/browser/components/protections/content/monitor-card.js index 43517aa26bbd..886383294ed2 100644 --- a/browser/components/protections/content/monitor-card.js +++ b/browser/components/protections/content/monitor-card.js @@ -43,8 +43,10 @@ export default class MonitorClass { }); let openLockwise = this.doc.getElementById("lockwise-link"); - openLockwise.addEventListener("click", () => { + openLockwise.addEventListener("click", evt => { this.doc.sendTelemetryEvent("click", "lw_open_breach_link"); + RPMSendAsyncMessage("OpenAboutLogins"); + evt.preventDefault(); }); } diff --git a/browser/components/protections/content/protections.html b/browser/components/protections/content/protections.html index 7bd9d9269c17..d98b21843b21 100644 --- a/browser/components/protections/content/protections.html +++ b/browser/components/protections/content/protections.html @@ -171,7 +171,7 @@ - + diff --git a/browser/components/protections/test/browser/browser_protections_telemetry.js b/browser/components/protections/test/browser/browser_protections_telemetry.js index 0c29f7d8b73a..5fb760c6c43a 100644 --- a/browser/components/protections/test/browser/browser_protections_telemetry.js +++ b/browser/components/protections/test/browser/browser_protections_telemetry.js @@ -136,8 +136,13 @@ function waitForTelemetryEventCount(count) { Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS, false ).content; + if (!events) { + return null; + } + // Ignore irrelevant events from other parts of the browser. + events = events.filter(e => e[1] == "security.ui.protections"); info("got " + (events && events.length) + " events"); - if (events && events.length == count) { + if (events.length == count) { return events; } return null; diff --git a/toolkit/components/telemetry/Events.yaml b/toolkit/components/telemetry/Events.yaml index d26683a713cd..cd335e9e3f0e 100644 --- a/toolkit/components/telemetry/Events.yaml +++ b/toolkit/components/telemetry/Events.yaml @@ -561,7 +561,7 @@ normandy: pwmgr: open_management: - objects: ["autocomplete", "capturedoorhanger", "contextmenu", "direct", "fxamenu", "mainmenu", "pageinfo", "preferences"] + objects: ["aboutprotections", "autocomplete", "capturedoorhanger", "contextmenu", "direct", "fxamenu", "mainmenu", "pageinfo", "preferences"] methods: ["open_management"] description: > Sent when opening the password management UI.