mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] No issue: Renew/Remove metrics set to expire in v102
No issue: Renew/Remove metrics set to expire in v102
This commit is contained in:
parent
4f278be6f7
commit
3507b9edd1
@ -2410,71 +2410,6 @@ bookmarks_management:
|
||||
metadata:
|
||||
tags:
|
||||
- Bookmarks
|
||||
custom_tab:
|
||||
closed:
|
||||
type: event
|
||||
description: |
|
||||
A user closed the custom tab
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/977
|
||||
- https://github.com/mozilla-mobile/fenix/issues/19923
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/1697
|
||||
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
|
||||
- https://github.com/mozilla-mobile/fenix/pull/18143
|
||||
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
|
||||
- https://github.com/mozilla-mobile/fenix/pull/21316#issuecomment-944615938
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 102
|
||||
metadata:
|
||||
tags:
|
||||
- CustomTabs
|
||||
action_button:
|
||||
type: event
|
||||
description: |
|
||||
A user pressed the action button provided by the launching app
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/977
|
||||
- https://github.com/mozilla-mobile/fenix/issues/19923
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/1697
|
||||
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
|
||||
- https://github.com/mozilla-mobile/fenix/pull/18143
|
||||
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
|
||||
- https://github.com/mozilla-mobile/fenix/pull/21316#issuecomment-944615938
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 102
|
||||
metadata:
|
||||
tags:
|
||||
- CustomTabs
|
||||
menu:
|
||||
type: event
|
||||
description: |
|
||||
A user opened the custom tabs menu
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/977
|
||||
- https://github.com/mozilla-mobile/fenix/issues/19923
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/1697
|
||||
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
|
||||
- https://github.com/mozilla-mobile/fenix/pull/18143
|
||||
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
|
||||
- https://github.com/mozilla-mobile/fenix/pull/21316#issuecomment-944615938
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 102
|
||||
metadata:
|
||||
tags:
|
||||
- CustomTabs
|
||||
|
||||
activation:
|
||||
identifier:
|
||||
type: string
|
||||
@ -6949,11 +6884,12 @@ start_on_home:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/19881
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/19885
|
||||
- https://github.com/mozilla-mobile/fenix/pull/24982
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 102
|
||||
expires: 114
|
||||
metadata:
|
||||
tags:
|
||||
- HomeScreen
|
||||
@ -6965,11 +6901,12 @@ start_on_home:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/19881
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/19885
|
||||
- https://github.com/mozilla-mobile/fenix/pull/24982
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 102
|
||||
expires: 114
|
||||
metadata:
|
||||
tags:
|
||||
- HomeScreen
|
||||
@ -6983,11 +6920,12 @@ recent_tabs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/19955
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/20138
|
||||
- https://github.com/mozilla-mobile/fenix/pull/24982
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 102
|
||||
expires: 114
|
||||
metadata:
|
||||
tags:
|
||||
- RecentTabs
|
||||
@ -6999,11 +6937,12 @@ recent_tabs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/19955
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/20138
|
||||
- https://github.com/mozilla-mobile/fenix/pull/24982
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 102
|
||||
expires: 114
|
||||
metadata:
|
||||
tags:
|
||||
- RecentTabs
|
||||
@ -7015,11 +6954,12 @@ recent_tabs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/20393
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/20138
|
||||
- https://github.com/mozilla-mobile/fenix/pull/24982
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 102
|
||||
expires: 114
|
||||
metadata:
|
||||
tags:
|
||||
- RecentTabs
|
||||
|
@ -6,8 +6,6 @@ package org.mozilla.fenix.components.metrics
|
||||
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import mozilla.components.browser.menu.facts.BrowserMenuFacts
|
||||
import mozilla.components.browser.toolbar.facts.ToolbarFacts
|
||||
import mozilla.components.compose.browser.awesomebar.AwesomeBarFacts as ComposeAwesomeBarFacts
|
||||
import mozilla.components.concept.awesomebar.AwesomeBar
|
||||
import mozilla.components.feature.autofill.facts.AutofillFacts
|
||||
import mozilla.components.feature.awesomebar.facts.AwesomeBarFacts
|
||||
@ -17,7 +15,6 @@ import mozilla.components.feature.awesomebar.provider.HistoryStorageSuggestionPr
|
||||
import mozilla.components.feature.awesomebar.provider.SearchSuggestionProvider
|
||||
import mozilla.components.feature.awesomebar.provider.SessionSuggestionProvider
|
||||
import mozilla.components.feature.contextmenu.facts.ContextMenuFacts
|
||||
import mozilla.components.feature.customtabs.CustomTabsFacts
|
||||
import mozilla.components.feature.media.facts.MediaFacts
|
||||
import mozilla.components.feature.prompts.dialog.LoginDialogFacts
|
||||
import mozilla.components.feature.prompts.facts.CreditCardAutofillDialogFacts
|
||||
@ -42,8 +39,6 @@ import org.mozilla.fenix.GleanMetrics.Awesomebar
|
||||
import org.mozilla.fenix.GleanMetrics.BrowserSearch
|
||||
import org.mozilla.fenix.GleanMetrics.ContextualMenu
|
||||
import org.mozilla.fenix.GleanMetrics.CreditCards
|
||||
import org.mozilla.fenix.GleanMetrics.CustomTab
|
||||
import org.mozilla.fenix.GleanMetrics.Events
|
||||
import org.mozilla.fenix.GleanMetrics.LoginDialog
|
||||
import org.mozilla.fenix.GleanMetrics.MediaNotification
|
||||
import org.mozilla.fenix.GleanMetrics.MediaState
|
||||
@ -52,6 +47,7 @@ import org.mozilla.fenix.GleanMetrics.ProgressiveWebApp
|
||||
import org.mozilla.fenix.GleanMetrics.SyncedTabs
|
||||
import org.mozilla.fenix.search.awesomebar.ShortcutsSuggestionProvider
|
||||
import org.mozilla.fenix.utils.Settings
|
||||
import mozilla.components.compose.browser.awesomebar.AwesomeBarFacts as ComposeAwesomeBarFacts
|
||||
|
||||
interface MetricController {
|
||||
fun start(type: MetricServiceType)
|
||||
@ -143,17 +139,6 @@ internal class ReleaseMetricController(
|
||||
else -> Unit
|
||||
}
|
||||
}
|
||||
Component.BROWSER_TOOLBAR to ToolbarFacts.Items.MENU -> {
|
||||
metadata?.get("customTab")?.let { CustomTab.menu.record(NoExtras()) }
|
||||
?: Events.toolbarMenuVisible.record(NoExtras())
|
||||
}
|
||||
Component.FEATURE_CUSTOMTABS to CustomTabsFacts.Items.ACTION_BUTTON -> {
|
||||
CustomTab.actionButton.record(NoExtras())
|
||||
}
|
||||
Component.FEATURE_CUSTOMTABS to CustomTabsFacts.Items.CLOSE -> {
|
||||
CustomTab.closed.record(NoExtras())
|
||||
}
|
||||
|
||||
Component.FEATURE_CONTEXTMENU to ContextMenuFacts.Items.ITEM -> {
|
||||
metadata?.get("item")?.let { item ->
|
||||
contextMenuAllowList[item]?.let { extraKey ->
|
||||
|
@ -6,15 +6,13 @@ package org.mozilla.fenix.components.metrics
|
||||
|
||||
import io.mockk.MockKAnnotations
|
||||
import io.mockk.every
|
||||
import io.mockk.impl.annotations.MockK
|
||||
import io.mockk.mockk
|
||||
import io.mockk.verify
|
||||
import io.mockk.verifyAll
|
||||
import mozilla.components.browser.toolbar.facts.ToolbarFacts
|
||||
import io.mockk.impl.annotations.MockK
|
||||
import mozilla.components.feature.autofill.facts.AutofillFacts
|
||||
import mozilla.components.feature.awesomebar.facts.AwesomeBarFacts
|
||||
import mozilla.components.feature.contextmenu.facts.ContextMenuFacts
|
||||
import mozilla.components.feature.customtabs.CustomTabsFacts
|
||||
import mozilla.components.feature.media.facts.MediaFacts
|
||||
import mozilla.components.feature.prompts.dialog.LoginDialogFacts
|
||||
import mozilla.components.feature.prompts.facts.CreditCardAutofillDialogFacts
|
||||
@ -43,12 +41,11 @@ import org.mozilla.fenix.GleanMetrics.Awesomebar
|
||||
import org.mozilla.fenix.GleanMetrics.BrowserSearch
|
||||
import org.mozilla.fenix.GleanMetrics.ContextualMenu
|
||||
import org.mozilla.fenix.GleanMetrics.CreditCards
|
||||
import org.mozilla.fenix.GleanMetrics.CustomTab
|
||||
import org.mozilla.fenix.GleanMetrics.LoginDialog
|
||||
import org.mozilla.fenix.GleanMetrics.MediaNotification
|
||||
import org.mozilla.fenix.GleanMetrics.ProgressiveWebApp
|
||||
import org.mozilla.fenix.components.metrics.ReleaseMetricController.Companion
|
||||
import org.mozilla.fenix.GleanMetrics.SyncedTabs
|
||||
import org.mozilla.fenix.components.metrics.ReleaseMetricController.Companion
|
||||
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
|
||||
import org.mozilla.fenix.utils.Settings
|
||||
|
||||
@ -314,41 +311,6 @@ class MetricControllerTest {
|
||||
assertNull(MediaNotification.pause.testGetValue().single().extra)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `WHEN processing a CustomTab fact THEN the right metric is recorded`() {
|
||||
val controller = ReleaseMetricController(emptyList(), { true }, { true }, mockk())
|
||||
val action = mockk<Action>(relaxed = true)
|
||||
var fact: Fact
|
||||
|
||||
with(controller) {
|
||||
fact = Fact(
|
||||
Component.BROWSER_TOOLBAR,
|
||||
action,
|
||||
ToolbarFacts.Items.MENU,
|
||||
metadata = mapOf("customTab" to true)
|
||||
)
|
||||
fact.process()
|
||||
|
||||
assertEquals(true, CustomTab.menu.testHasValue())
|
||||
assertEquals(1, CustomTab.menu.testGetValue().size)
|
||||
assertEquals(null, CustomTab.menu.testGetValue().single().extra)
|
||||
|
||||
fact = Fact(Component.FEATURE_CUSTOMTABS, action, CustomTabsFacts.Items.ACTION_BUTTON)
|
||||
fact.process()
|
||||
|
||||
assertEquals(true, CustomTab.actionButton.testHasValue())
|
||||
assertEquals(1, CustomTab.actionButton.testGetValue().size)
|
||||
assertEquals(null, CustomTab.actionButton.testGetValue().single().extra)
|
||||
|
||||
fact = Fact(Component.FEATURE_CUSTOMTABS, action, CustomTabsFacts.Items.CLOSE)
|
||||
fact.process()
|
||||
|
||||
assertEquals(true, CustomTab.closed.testHasValue())
|
||||
assertEquals(1, CustomTab.closed.testGetValue().size)
|
||||
assertEquals(null, CustomTab.closed.testGetValue().single().extra)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `WHEN processing a FEATURE_AUTOFILL fact THEN the right metric is recorded`() {
|
||||
val controller = ReleaseMetricController(emptyList(), { true }, { true }, mockk())
|
||||
|
Loading…
Reference in New Issue
Block a user