зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1562575 - Part 1 - Remove content blocking telemetry events from identity popup telemetry. r=ewright
This lives in the protections popup now and will get a new probe. Since I'm only removing data collection I don't think a data steward is required to sign off. I'm removing recordClick calls in identityPanel.inc.xul in a later patch. Differential Revision: https://phabricator.services.mozilla.com/D37555 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c74b95c375
Коммит
230d70e54a
|
@ -343,20 +343,10 @@ var gIdentityHandler = {
|
|||
},
|
||||
|
||||
recordClick(object) {
|
||||
let extra = {};
|
||||
for (let blocker of ContentBlocking.blockers) {
|
||||
if (blocker.telemetryIdentifier) {
|
||||
extra[blocker.telemetryIdentifier] = blocker.activated
|
||||
? "true"
|
||||
: "false";
|
||||
}
|
||||
}
|
||||
Services.telemetry.recordEvent(
|
||||
"security.ui.identitypopup",
|
||||
"click",
|
||||
object,
|
||||
null,
|
||||
extra
|
||||
object
|
||||
);
|
||||
},
|
||||
|
||||
|
@ -1101,24 +1091,10 @@ var gIdentityHandler = {
|
|||
window.addEventListener("focus", this, true);
|
||||
}
|
||||
|
||||
let extra = {};
|
||||
for (let blocker of ContentBlocking.blockers) {
|
||||
if (blocker.telemetryIdentifier) {
|
||||
extra[blocker.telemetryIdentifier] = blocker.activated
|
||||
? "true"
|
||||
: "false";
|
||||
}
|
||||
}
|
||||
|
||||
let shieldStatus = ContentBlocking.iconBox.hasAttribute("active")
|
||||
? "shield-showing"
|
||||
: "shield-hidden";
|
||||
Services.telemetry.recordEvent(
|
||||
"security.ui.identitypopup",
|
||||
"open",
|
||||
"identity_popup",
|
||||
shieldStatus,
|
||||
extra
|
||||
"identity_popup"
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ support-files = ../permissions/permissions.html
|
|||
[browser_identityPopup_clearSiteData.js]
|
||||
[browser_identityPopup_custom_roots.js]
|
||||
[browser_identityPopup_focus.js]
|
||||
[browser_identityPopup_telemetry.js]
|
||||
[browser_insecureLoginForms.js]
|
||||
support-files =
|
||||
insecure_opener.html
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const BENIGN_PAGE =
|
||||
"http://tracking.example.org/browser/browser/base/content/test/trackingUI/benignPage.html";
|
||||
|
||||
/**
|
||||
* Enable local telemetry recording for the duration of the tests.
|
||||
*/
|
||||
var oldCanRecord = Services.telemetry.canRecordExtended;
|
||||
Services.telemetry.canRecordExtended = true;
|
||||
registerCleanupFunction(function() {
|
||||
Services.telemetry.canRecordExtended = oldCanRecord;
|
||||
});
|
||||
|
||||
add_task(async function testIdentityPopupEvents() {
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
|
||||
|
||||
await promiseTabLoadEvent(tab, BENIGN_PAGE);
|
||||
|
||||
Services.telemetry.clearEvents();
|
||||
|
||||
let shown = BrowserTestUtils.waitForEvent(
|
||||
gIdentityHandler._identityPopup,
|
||||
"popupshown"
|
||||
);
|
||||
EventUtils.synthesizeMouseAtCenter(gIdentityHandler._identityBox, {});
|
||||
await shown;
|
||||
|
||||
let events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS,
|
||||
true
|
||||
).parent;
|
||||
let openEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "open" &&
|
||||
e[3] == "identity_popup"
|
||||
);
|
||||
is(openEvents.length, 1, "recorded telemetry for opening the identity popup");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
|
@ -13,13 +13,9 @@ const CONTAINER_PAGE =
|
|||
const TPC_PREF = "network.cookie.cookieBehavior";
|
||||
|
||||
add_task(async function setup() {
|
||||
let oldCanRecord = Services.telemetry.canRecordExtended;
|
||||
Services.telemetry.canRecordExtended = true;
|
||||
|
||||
await UrlClassifierTestUtils.addTestTrackers();
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
Services.telemetry.canRecordExtended = oldCanRecord;
|
||||
UrlClassifierTestUtils.cleanupTestTrackers();
|
||||
});
|
||||
});
|
||||
|
@ -50,8 +46,6 @@ async function assertSitesListed(
|
|||
|
||||
await openIdentityPopup();
|
||||
|
||||
Services.telemetry.clearEvents();
|
||||
|
||||
let categoryItem = document.getElementById(
|
||||
"identity-popup-content-blocking-category-cookies"
|
||||
);
|
||||
|
@ -63,17 +57,6 @@ async function assertSitesListed(
|
|||
|
||||
ok(true, "Cookies view was shown");
|
||||
|
||||
let events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS
|
||||
).parent;
|
||||
let buttonEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "click" &&
|
||||
e[3] == "cookies_subview_btn"
|
||||
);
|
||||
is(buttonEvents.length, 1, "recorded telemetry for the button click");
|
||||
|
||||
let listHeaders = cookiesView.querySelectorAll(
|
||||
".identity-popup-cookiesView-list-header"
|
||||
);
|
||||
|
|
|
@ -69,23 +69,9 @@ add_task(async function testOpenPreferencesFromCBPrefsButton() {
|
|||
"The preferences button is shown."
|
||||
);
|
||||
|
||||
Services.telemetry.clearEvents();
|
||||
|
||||
let shown = waitAndAssertPreferencesShown("trackingprotection");
|
||||
preferencesButton.click();
|
||||
await shown;
|
||||
|
||||
let events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS,
|
||||
true
|
||||
).parent;
|
||||
let clickEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "click" &&
|
||||
e[3] == "cb_prefs_button"
|
||||
);
|
||||
is(clickEvents.length, 1, "recorded telemetry for the click");
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -165,23 +151,9 @@ add_task(async function testOpenPreferencesFromTrackersSubview() {
|
|||
"The preferences button is shown."
|
||||
);
|
||||
|
||||
Services.telemetry.clearEvents();
|
||||
|
||||
let shown = waitAndAssertPreferencesShown("trackingprotection");
|
||||
preferencesButton.click();
|
||||
await shown;
|
||||
|
||||
let events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS,
|
||||
true
|
||||
).parent;
|
||||
let clickEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "click" &&
|
||||
e[3] == "trackers_prefs_btn"
|
||||
);
|
||||
is(clickEvents.length, 1, "recorded telemetry for the click");
|
||||
});
|
||||
|
||||
Services.prefs.clearUserPref(TP_PREF);
|
||||
|
@ -226,23 +198,9 @@ add_task(async function testOpenPreferencesFromCookiesSubview() {
|
|||
"The preferences button is shown."
|
||||
);
|
||||
|
||||
Services.telemetry.clearEvents();
|
||||
|
||||
let shown = waitAndAssertPreferencesShown("trackingprotection");
|
||||
preferencesButton.click();
|
||||
await shown;
|
||||
|
||||
let events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS,
|
||||
true
|
||||
).parent;
|
||||
let clickEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "click" &&
|
||||
e[3] == "cookies_prefs_btn"
|
||||
);
|
||||
is(clickEvents.length, 1, "recorded telemetry for the click");
|
||||
});
|
||||
|
||||
Services.prefs.clearUserPref(TPC_PREF);
|
||||
|
|
|
@ -84,78 +84,3 @@ add_task(async function testShieldHistogram() {
|
|||
// Reset these to make counting easier for the next test
|
||||
getShieldHistogram().clear();
|
||||
});
|
||||
|
||||
add_task(async function testIdentityPopupEvents() {
|
||||
Services.prefs.setBoolPref(PREF, true);
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
|
||||
|
||||
await promiseTabLoadEvent(tab, BENIGN_PAGE);
|
||||
|
||||
Services.telemetry.clearEvents();
|
||||
|
||||
await openIdentityPopup();
|
||||
|
||||
let events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS,
|
||||
true
|
||||
).parent;
|
||||
let openEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "open" &&
|
||||
e[3] == "identity_popup"
|
||||
);
|
||||
is(openEvents.length, 1, "recorded telemetry for opening the identity popup");
|
||||
is(openEvents[0][4], "shield-hidden", "recorded the shield as hidden");
|
||||
|
||||
await promiseTabLoadEvent(tab, TRACKING_PAGE);
|
||||
|
||||
await openIdentityPopup();
|
||||
|
||||
events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS,
|
||||
true
|
||||
).parent;
|
||||
openEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "open" &&
|
||||
e[3] == "identity_popup"
|
||||
);
|
||||
is(openEvents.length, 1, "recorded telemetry for opening the identity popup");
|
||||
is(openEvents[0][4], "shield-showing", "recorded the shield as showing");
|
||||
|
||||
info("Disable TP for the page (which reloads the page)");
|
||||
let tabReloadPromise = promiseTabLoadEvent(tab);
|
||||
document.querySelector("#tracking-action-unblock").doCommand();
|
||||
await tabReloadPromise;
|
||||
|
||||
events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS,
|
||||
true
|
||||
).parent;
|
||||
let clickEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "click" &&
|
||||
e[3] == "unblock"
|
||||
);
|
||||
is(clickEvents.length, 1, "recorded telemetry for the click");
|
||||
|
||||
info("Re-enable TP for the page (which reloads the page)");
|
||||
tabReloadPromise = promiseTabLoadEvent(tab);
|
||||
document.querySelector("#tracking-action-block").doCommand();
|
||||
await tabReloadPromise;
|
||||
|
||||
events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS,
|
||||
true
|
||||
).parent;
|
||||
clickEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" && e[2] == "click" && e[3] == "block"
|
||||
);
|
||||
is(clickEvents.length, 1, "recorded telemetry for the click");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
|
|
@ -10,13 +10,9 @@ const TRACKING_PAGE =
|
|||
const TP_PREF = "privacy.trackingprotection.enabled";
|
||||
|
||||
add_task(async function setup() {
|
||||
let oldCanRecord = Services.telemetry.canRecordExtended;
|
||||
Services.telemetry.canRecordExtended = true;
|
||||
|
||||
await UrlClassifierTestUtils.addTestTrackers();
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
Services.telemetry.canRecordExtended = oldCanRecord;
|
||||
UrlClassifierTestUtils.cleanupTestTrackers();
|
||||
});
|
||||
});
|
||||
|
@ -25,8 +21,6 @@ async function assertSitesListed(blocked) {
|
|||
await BrowserTestUtils.withNewTab(TRACKING_PAGE, async function(browser) {
|
||||
await openIdentityPopup();
|
||||
|
||||
Services.telemetry.clearEvents();
|
||||
|
||||
let categoryItem = document.getElementById(
|
||||
"identity-popup-content-blocking-category-tracking-protection"
|
||||
);
|
||||
|
@ -41,17 +35,6 @@ async function assertSitesListed(blocked) {
|
|||
|
||||
ok(true, "Trackers view was shown");
|
||||
|
||||
let events = Services.telemetry.snapshotEvents(
|
||||
Ci.nsITelemetry.DATASET_PRERELEASE_CHANNELS
|
||||
).parent;
|
||||
let buttonEvents = events.filter(
|
||||
e =>
|
||||
e[1] == "security.ui.identitypopup" &&
|
||||
e[2] == "click" &&
|
||||
e[3] == "trackers_subview_btn"
|
||||
);
|
||||
is(buttonEvents.length, 1, "recorded telemetry for the button click");
|
||||
|
||||
let listItems = trackersView.querySelectorAll(
|
||||
".identity-popup-content-blocking-list-item"
|
||||
);
|
||||
|
|
|
@ -1122,11 +1122,9 @@ security.ui.identitypopup:
|
|||
- 1522256
|
||||
- 1522919
|
||||
- 1553181
|
||||
- 1562575
|
||||
description: >
|
||||
How many times the control center was opened.
|
||||
Keyed by the state of the content blocking shield, where the shield-showing key indicates
|
||||
that the shield icon in the identity UI is visible to the user, and shield-hidden indicates
|
||||
that it is not visible.
|
||||
expiry_version: "72"
|
||||
notification_emails:
|
||||
- jhofmann@mozilla.com
|
||||
|
@ -1135,31 +1133,18 @@ security.ui.identitypopup:
|
|||
release_channel_collection: opt-in
|
||||
record_in_processes:
|
||||
- main
|
||||
extra_keys:
|
||||
fp: Whether Fingerprinter blocking was active while the user opened the popup
|
||||
cm: Whether Cryptominer blocking was active while the user opened the popup
|
||||
tp: Whether Tracking Protection was active while the user opened the popup
|
||||
cr: Whether Cookie Restrictions was active while the user opened the popup
|
||||
products:
|
||||
- firefox
|
||||
click:
|
||||
objects: [
|
||||
"cb_prefs_button",
|
||||
"permission_prefs_btn",
|
||||
"clear_sitedata",
|
||||
"unblock",
|
||||
"unblock_private",
|
||||
"block",
|
||||
"report_breakage",
|
||||
"security_subview_btn",
|
||||
"trackers_subview_btn",
|
||||
"cookies_subview_btn",
|
||||
"trackers_prefs_btn",
|
||||
"cookies_prefs_btn"
|
||||
]
|
||||
bug_numbers:
|
||||
- 1484251
|
||||
- 1553181
|
||||
- 1562575
|
||||
description: >
|
||||
User interaction by click events in the identity popup.
|
||||
expiry_version: "72"
|
||||
|
@ -1170,11 +1155,6 @@ security.ui.identitypopup:
|
|||
release_channel_collection: opt-in
|
||||
record_in_processes:
|
||||
- main
|
||||
extra_keys:
|
||||
fp: Whether Fingerprinter blocking was active while the user interacted with the UI
|
||||
cm: Whether Cryptominer blocking was active while the user interacted with the UI
|
||||
tp: Whether Tracking Protection was active while the user interacted with the UI
|
||||
cr: Whether Cookie Restrictions was active while the user interacted with the UI
|
||||
products:
|
||||
- firefox
|
||||
uptake.remotecontent.result:
|
||||
|
|
Загрузка…
Ссылка в новой задаче