Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Correct Glean channel names when running Oculus tests. (#3059)
Browse files Browse the repository at this point in the history
  • Loading branch information
daoshengmu authored Mar 27, 2020
1 parent 28b0362 commit 96e0fa0
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import org.junit.Assert.*
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.vrbrowser.GleanMetrics.*
import org.mozilla.vrbrowser.GleanMetrics.Distribution
import org.mozilla.vrbrowser.GleanMetrics.FirefoxAccount
import org.mozilla.vrbrowser.GleanMetrics.Tabs
import org.mozilla.vrbrowser.GleanMetrics.Url
import org.mozilla.vrbrowser.telemetry.GleanMetricsService
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
Expand Down Expand Up @@ -51,7 +54,9 @@ class GleanMetricsServiceTest {
assertFalse(Distribution.channelName.testHasValue())
GleanMetricsService.testSetStartupMetrics()
assertTrue(Distribution.channelName.testHasValue())
assertEquals(Distribution.channelName.testGetValue(), BuildConfig.FLAVOR_platform)
assertEquals(Distribution.channelName.testGetValue(),
if (org.mozilla.vrbrowser.utils.DeviceType.isOculusBuild()) "oculusvr"
else BuildConfig.FLAVOR_platform)
}

@Test
Expand Down

0 comments on commit 96e0fa0

Please sign in to comment.