Commit 2040af6a authored by codrut.topliceanu's avatar codrut.topliceanu Committed by mergify[bot]
Browse files

For #20367 - Fixes removeAllTabs adding to recently closed

 `removeAllTabs` will now no longer allow `UndoMiddleware` from recovering the tabs.
parent d6ad8ba4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class DefaultDeleteBrowsingDataController(

    override suspend fun deleteTabs() {
        withContext(coroutineContext) {
            removeAllTabs.invoke()
            removeAllTabs.invoke(false)
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ class DefaultDeleteBrowsingDataControllerTest {
        controller.deleteTabs()

        verify {
            removeAllTabs.invoke()
            removeAllTabs.invoke(false)
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ class DeleteAndQuitTest {

        verifyOrder {
            snackbar.show()
            removeAllTabsUseCases.invoke()
            removeAllTabsUseCases.invoke(false)
            activity.finishAndRemoveTask()
        }

+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ class CloseOnLastTabBindingTest {

        binding.start()

        browserStore.dispatch(TabListAction.RemoveAllTabsAction)
        browserStore.dispatch(TabListAction.RemoveAllTabsAction())

        browserStore.waitUntilIdle()

+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ class TelemetryMiddlewareTest {
        assertEquals(2, settings.openTabsCount)
        verify(exactly = 1) { metrics.track(Event.HaveOpenTabs) }

        store.dispatch(TabListAction.RemoveAllTabsAction).joinBlocking()
        store.dispatch(TabListAction.RemoveAllTabsAction()).joinBlocking()
        assertEquals(0, settings.openTabsCount)
        verify(exactly = 1) { metrics.track(Event.HaveNoOpenTabs) }
    }