Bump Android-Components version to 100.0.20220309001717

upstream-sync
Grigory Kruglov 2 years ago committed by Grisha Kruglov
parent 6c793e035b
commit 7ca7190199

@ -14,7 +14,6 @@ import mozilla.components.concept.sync.AccountObserver
import mozilla.components.concept.sync.AuthType
import mozilla.components.concept.sync.OAuthAccount
import mozilla.components.lib.crash.CrashReporter
import mozilla.components.service.fxa.manager.FxaAccountManager
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.fenix.perf.StrictModeManager
import kotlin.coroutines.CoroutineContext

@ -53,10 +53,9 @@ class AccountAbnormalitiesTest {
@Test
fun `LogoutWithoutAuth detected`() = runBlocking {
val crashReporter: CrashReporter = mockk(relaxed = true)
val accountManager: FxaAccountManager = mockk(relaxed = true)
val accountAbnormalities = newAccountAbnormalities(crashReporter, this.coroutineContext)
accountAbnormalities.accountManagerStarted(accountManager)
accountAbnormalities.onReady(mockk(relaxed = true))
// Logout action must be preceded by auth.
accountAbnormalities.userRequestedLogout()
@ -66,10 +65,9 @@ class AccountAbnormalitiesTest {
@Test
fun `OverlappingFxaLogoutRequest detected`() = runBlocking {
val crashReporter: CrashReporter = mockk(relaxed = true)
val accountManager: FxaAccountManager = mockk(relaxed = true)
val accountAbnormalities = newAccountAbnormalities(crashReporter, this.coroutineContext)
accountAbnormalities.accountManagerStarted(accountManager)
accountAbnormalities.onReady(mockk(relaxed = true))
accountAbnormalities.onAuthenticated(mockk(), mockk())
// So far, so good. A regular logout request while being authenticated.
@ -84,10 +82,9 @@ class AccountAbnormalitiesTest {
@Test
fun `callback logout abnormalities detected`() = runBlocking {
val crashReporter: CrashReporter = mockk(relaxed = true)
val accountManager: FxaAccountManager = mockk(relaxed = true)
val accountAbnormalities = newAccountAbnormalities(crashReporter, this.coroutineContext)
accountAbnormalities.accountManagerStarted(accountManager)
accountAbnormalities.onReady(mockk(relaxed = true))
// User didn't request this logout.
accountAbnormalities.onLoggedOut()
@ -100,7 +97,7 @@ class AccountAbnormalitiesTest {
val accountManager: FxaAccountManager = mockk(relaxed = true)
val accountAbnormalities = newAccountAbnormalities(crashReporter, this.coroutineContext)
accountAbnormalities.accountManagerStarted(accountManager)
accountAbnormalities.onReady(null)
accountAbnormalities.onAuthenticated(mockk(), mockk())
verify { crashReporter wasNot Called }
@ -110,7 +107,7 @@ class AccountAbnormalitiesTest {
val accountAbnormalities2 = newAccountAbnormalities(crashReporter, this.coroutineContext)
// mock accountManager doesn't have an account, but we expect it to have one since we
// were authenticated before our "restart".
accountAbnormalities2.accountManagerStarted(accountManager)
accountAbnormalities2.onReady(null)
assertCaughtException<AbnormalFxaEvent.MissingExpectedAccountAfterStartup>(crashReporter)
}
@ -118,10 +115,9 @@ class AccountAbnormalitiesTest {
@Test
fun `logout happy case`() = runBlocking {
val crashReporter: CrashReporter = mockk()
val accountManager: FxaAccountManager = mockk(relaxed = true)
val accountAbnormalities = newAccountAbnormalities(crashReporter, coroutineContext)
accountAbnormalities.accountManagerStarted(accountManager)
accountAbnormalities.onReady(mockk(relaxed = true))
// We saw an auth event, then user requested a logout.
accountAbnormalities.onAuthenticated(mockk(), mockk())

@ -3,5 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
object AndroidComponents {
const val VERSION = "100.0.20220308160838"
const val VERSION = "100.0.20220309001717"
}

Loading…
Cancel
Save