Bug 1839228 - RemoteTabsStorage now catches the public error rather than InternalError.
This commit is contained in:
committed by
mergify[bot]
parent
cb3d9fc33a
commit
acac46c032
@@ -17,7 +17,7 @@ import mozilla.components.concept.sync.SyncableStore
|
||||
import mozilla.components.support.base.log.logger.Logger
|
||||
import mozilla.components.support.utils.logElapsedTime
|
||||
import java.io.File
|
||||
import mozilla.appservices.remotetabs.InternalException as RemoteTabProviderException
|
||||
import mozilla.appservices.remotetabs.TabsApiException as RemoteTabProviderException
|
||||
import mozilla.appservices.remotetabs.TabsStore as RemoteTabsProvider
|
||||
|
||||
private const val TABS_DB_NAME = "tabs.sqlite"
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.mockito.Mockito.spy
|
||||
import org.mockito.Mockito.times
|
||||
import org.mockito.Mockito.verify
|
||||
import org.mockito.Mockito.`when`
|
||||
import mozilla.appservices.remotetabs.InternalException as RemoteTabProviderException
|
||||
import mozilla.appservices.remotetabs.TabsApiException as RemoteTabProviderException
|
||||
import mozilla.appservices.remotetabs.TabsStore as RemoteTabsProvider
|
||||
|
||||
@ExperimentalCoroutinesApi
|
||||
@@ -150,7 +150,7 @@ class RemoteTabsStorageTest {
|
||||
|
||||
@Test
|
||||
fun `exceptions from getAll are propagated to the crash reporter`() = runTest {
|
||||
val throwable = RemoteTabProviderException("test")
|
||||
val throwable = RemoteTabProviderException.UnexpectedTabsException("test")
|
||||
`when`(apiMock.getAll()).thenAnswer { throw throwable }
|
||||
|
||||
remoteTabs.getAll()
|
||||
|
||||
Reference in New Issue
Block a user