commit 8720d3395e4f5e3d566d2de44eb42ef5f6b95fcd
parent 76b71541407eb882ad1129600713b49fa000b22c
Author: Alexandru Marc <amarc@mozilla.com>
Date: Thu, 2 Oct 2025 21:14:12 +0300
Revert "Bug 1991866 - Fix [c-c perma] toolkit/components/telemetry/tests/unit/test_TOUNotificationFlow.js | test_canUpload_allowed_when_both_bypass_prefs_true. r=mviar,toolkit-telemetry-reviewers" for causing xpcshell failures @ test_TOUNotificationFlow.js
This reverts commit ff2376c18bda1dcf77bd0adf8c4d869ebfd76cec.
Diffstat:
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/toolkit/components/telemetry/app/TelemetryReportingPolicy.sys.mjs b/toolkit/components/telemetry/app/TelemetryReportingPolicy.sys.mjs
@@ -780,9 +780,7 @@ var TelemetryReportingPolicyImpl = {
// set.
const bypassTOUFlow =
Services.prefs.getBoolPref(TOU_BYPASS_NOTIFICATION_PREF, false) ||
- (!Services.prefs.getBoolPref("browser.preonboarding.enabled", false) &&
- this._nimbusVariables?.enabled !== true) ||
- this._nimbusVariables?.enabled === false;
+ !this._nimbusVariables.enabled;
const allowInteractionData = Services.prefs.getBoolPref(
"datareporting.healthreport.uploadEnabled",
false
diff --git a/toolkit/components/telemetry/tests/unit/test_TOUNotificationFlow.js b/toolkit/components/telemetry/tests/unit/test_TOUNotificationFlow.js
@@ -756,7 +756,6 @@ add_task(async function test_canUpload_allowed_when_both_bypass_prefs_true() {
registerCleanupFunction(() => {
Services.prefs.clearUserPref(TelemetryUtils.Preferences.BypassNotification);
Services.prefs.clearUserPref("termsofuse.bypassNotification");
- Services.prefs.clearUserPref("browser.preonboarding.enabled");
TelemetryReportingPolicy.reset();
});
@@ -773,16 +772,10 @@ add_task(async function test_canUpload_allowed_when_both_bypass_prefs_true() {
Services.prefs.setBoolPref("termsofuse.bypassNotification", false);
- Services.prefs.setBoolPref("browser.preonboarding.enabled", true);
Assert.ok(
!TelemetryReportingPolicy.canUpload(),
"Upload blocked when only one bypass is true and no other allow path conditions are met"
);
- Services.prefs.setBoolPref("browser.preonboarding.enabled", false);
- Assert.ok(
- TelemetryReportingPolicy.canUpload(),
- "Upload NOT blocked when only one bypass is true and no other allow path conditions are met"
- );
});
add_task(