Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74cfeceb authored by Pierre Barbier de Reuille's avatar Pierre Barbier de Reuille Committed by Android (Google) Code Review
Browse files

Merge "Use isDeviceEligibleForDesktopMode in tests" into main

parents 242414e3 55549637
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ class DesktopActivityOrientationChangeHandlerTest : ShellTestCase() {
                .strictness(Strictness.LENIENT)
                .spyStatic(DesktopModeStatus::class.java)
                .startMocking()
        doReturn(true).`when` { DesktopModeStatus.isDesktopModeSupported(any()) }
        doReturn(true).`when` { DesktopModeStatus.isDeviceEligibleForDesktopMode(any()) }

        testScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob())
        shellInit = spy(ShellInit(testExecutor))
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ class DesktopModeKeyGestureHandlerTest : ShellTestCase() {
                .strictness(Strictness.LENIENT)
                .spyStatic(DesktopModeStatus::class.java)
                .startMocking()
        doReturn(true).`when` { DesktopModeStatus.isDesktopModeSupported(any()) }
        doReturn(true).`when` { DesktopModeStatus.isDeviceEligibleForDesktopMode(any()) }

        testScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob())
        shellInit = spy(ShellInit(testExecutor))
+1 −1
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
                .spyStatic(DesktopModeStatus::class.java)
                .spyStatic(Toast::class.java)
                .startMocking()
        doReturn(true).`when` { DesktopModeStatus.isDesktopModeSupported(any()) }
        doReturn(true).`when` { DesktopModeStatus.isDeviceEligibleForDesktopMode(any()) }

        testScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob())
        shellInit = spy(ShellInit(testExecutor))
+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
import org.mockito.kotlin.whenever

/**
 * Test class for [DesktopModeStatus].
 */
@SmallTest
@Presubmit
@EnableFlags(Flags.FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ class DesktopModeWindowDecorViewModelAppHandleOnlyTest :
                .spyStatic(DesktopModeStatus::class.java)
                .spyStatic(DragPositioningCallbackUtility::class.java)
                .startMocking()
        doReturn(false).`when` { DesktopModeStatus.isDesktopModeSupported(any()) }
        doReturn(false).`when` { DesktopModeStatus.isDeviceEligibleForDesktopMode(any()) }
        doReturn(true).`when` { DesktopModeStatus.overridesShowAppHandle(any())}
        setUpCommon()
    }
Loading