Bug 1839228 - RemoteTabsStorage now catches the public error rather than InternalError.

This commit is contained in:
Mark Hammond
2023-06-19 15:21:04 -04:00
committed by mergify[bot]
parent cb3d9fc33a
commit acac46c032
2 changed files with 3 additions and 3 deletions

View File

@@ -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"

View File

@@ -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()