Open
Bug 2075375
Opened 1 month ago
Updated 22 days ago
Update test in PrivacyReportNotificationHelperTest to pass the result of hasPostNotificationsPermission() into notify as a Boolean
Categories
(Firefox for Android :: Experimentation and Telemetry, task)
Tracking
()
NEW
People
(Reporter: Gela, Unassigned)
References
Details
(Keywords: good-first-bug, Whiteboard: [fxdroid][android-activation-trust])
In PrivacyReportNotificationHelperTest.kt in the following test:
@Test
fun `GIVEN notifications are disabled WHEN showPrivacyReportNotification is called THEN no sent event is recorded`() {
val notificationManager = testContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
shadowOf(notificationManager).setNotificationsEnabled(false)
showPrivacyReportNotification(testContext, notificationsDelegate, trackersBlockedCount = 5)
assertEquals(0, shadowOf(notificationManager).allNotifications.size)
assertNull(TrackingProtection.privacyReportNotificationSent.testGetValue())
}
Lets pass the result of hasPostNotificationsPermission() into notify as a Boolean instead. See this comment for more details.
Updated•1 month ago
|
Updated•24 days ago
|
Restrict Comments: true
Updated•24 days ago
|
Restrict Comments: false
You need to log in
before you can comment on or make changes to this bug.
Description
•