Bug 1818512 - mirror browser.engagement.profile_count to glean r=chutten

Differential Revision: https://phabricator.services.mozilla.com/D170786
This commit is contained in:
pmcmanis
2023-02-24 15:57:57 +00:00
parent 76090e48dc
commit 503ed5e6fb
3 changed files with 29 additions and 0 deletions

View File

@@ -86,6 +86,10 @@ function reset(resetFile = true) {
function setup() {
reset();
// FOG needs a profile directory to put its data in.
do_get_profile();
// Initialize FOG so we can test the FOG version of profile count
Services.fog.initializeFOG();
BrowserUsageTelemetry.Policy.readProfileCountFile = async path => {
if (!gProfileCounterFilePath) {
@@ -147,6 +151,7 @@ function checkSuccess(profilesReported, rawCount = profilesReported) {
profilesReported,
"The value reported to telemetry should be the expected profile count"
);
Assert.equal(rawCount, Glean.browser.engagement.profile_count.testGetValue());
}
function checkError() {