commit 910fe151fd9251d7f9c43ff1f05a3528bcd88d01 parent 74e86f72e209b1952ce733711a73abe8569f81b2 Author: Benjamin VanderSloot <bvandersloot@mozilla.com> Date: Fri, 2 Jan 2026 14:30:56 +0000 Bug 2008101 - Disable privacy.annotate_channels.strict_list.enabled on ETP standard Fenix channels - r=timhuang,android-reviewers,Roger Differential Revision: https://phabricator.services.mozilla.com/D277702 Diffstat:
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/ext/TrackingProtectionPolicy.kt b/mobile/android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/ext/TrackingProtectionPolicy.kt @@ -67,7 +67,8 @@ internal fun TrackingProtectionPolicy.getStrictSocialTrackingProtection(): Boole internal fun TrackingProtectionPolicy.getEtpLevel(): Int { return when { trackingCategories.contains(TrackingCategory.NONE) -> ContentBlocking.EtpLevel.NONE - else -> ContentBlocking.EtpLevel.STRICT + trackingCategories.contains(TrackingCategory.STRICT) -> ContentBlocking.EtpLevel.STRICT + else -> ContentBlocking.EtpLevel.DEFAULT } } diff --git a/mobile/android/android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineTest.kt b/mobile/android/android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/GeckoEngineTest.kt @@ -840,7 +840,7 @@ class GeckoEngineTest { } @Test - fun `setEnhancedTrackingProtectionLevel MUST always be set to STRICT unless the tracking protection policy is none`() { + fun `setEnhancedTrackingProtectionLevel MUST reflect the tracking protection policy`() { val mockRuntime = mock<GeckoRuntime>() val settings = spy(ContentBlocking.Settings.Builder().build()) whenever(mockRuntime.settings).thenReturn(mock()) @@ -851,7 +851,7 @@ class GeckoEngineTest { engine.settings.trackingProtectionPolicy = TrackingProtectionPolicy.recommended() verify(mockRuntime.settings.contentBlocking).setEnhancedTrackingProtectionLevel( - ContentBlocking.EtpLevel.STRICT, + ContentBlocking.EtpLevel.DEFAULT, ) reset(settings) @@ -859,14 +859,14 @@ class GeckoEngineTest { engine.settings.trackingProtectionPolicy = TrackingProtectionPolicy.recommended() verify(mockRuntime.settings.contentBlocking, never()).setEnhancedTrackingProtectionLevel( - ContentBlocking.EtpLevel.STRICT, + ContentBlocking.EtpLevel.DEFAULT, ) reset(settings) engine.settings.trackingProtectionPolicy = TrackingProtectionPolicy.strict() - verify(mockRuntime.settings.contentBlocking, never()).setEnhancedTrackingProtectionLevel( + verify(mockRuntime.settings.contentBlocking).setEnhancedTrackingProtectionLevel( ContentBlocking.EtpLevel.STRICT, ) diff --git a/mobile/android/android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/ext/TrackingProtectionPolicyKtTest.kt b/mobile/android/android-components/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/ext/TrackingProtectionPolicyKtTest.kt @@ -64,8 +64,8 @@ class TrackingProtectionPolicyKtTest { } @Test - fun `getEtpLevel is always Strict unless None`() { - assertEquals(EtpLevel.STRICT, TrackingProtectionPolicy.recommended().getEtpLevel()) + fun `getEtpLevel reflects TrackingProtectionPolicy`() { + assertEquals(EtpLevel.DEFAULT, TrackingProtectionPolicy.recommended().getEtpLevel()) assertEquals(EtpLevel.STRICT, TrackingProtectionPolicy.strict().getEtpLevel()) assertEquals(EtpLevel.NONE, TrackingProtectionPolicy.none().getEtpLevel()) }