Unverified Commit 8dfa4525 authored by Roger Yang's avatar Roger Yang Committed by GitHub
Browse files

Fix OpenSpecificTabIntentProcessorTest to remove AbstractMediaService (#17955)

parent f4f5e4b6
......@@ -14,7 +14,6 @@ import io.mockk.verifyOrder
import mozilla.components.browser.state.state.BrowserState
import mozilla.components.browser.state.state.createTab
import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.feature.media.service.AbstractMediaService
import mozilla.components.feature.media.service.AbstractMediaSessionService
import mozilla.components.feature.tabs.TabsUseCases
import org.junit.Assert.assertFalse
......@@ -67,9 +66,14 @@ class OpenSpecificTabIntentProcessorTest {
@Test
fun `GIVEN an intent with null extra string WHEN it is processed THEN openToBrowser should not be called`() {
val intent = Intent().apply {
action = AbstractMediaService.Companion.ACTION_SWITCH_TAB
action = AbstractMediaSessionService.Companion.ACTION_SWITCH_TAB
}
val store = BrowserStore(BrowserState(tabs = listOf(createTab(id = TEST_SESSION_ID, url = "https:mozilla.org"))))
val tabUseCases: TabsUseCases = mockk(relaxed = true)
every { activity.components.core.store } returns store
every { activity.components.useCases.tabsUseCases } returns tabUseCases
assertFalse(processor.process(intent, navController, out))
verify(exactly = 0) { activity.openToBrowser(BrowserDirection.FromGlobal) }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment