Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ test_module_config { "com.android.wm.shell.flicker.fundamentals.OpenUnlimitedAppsFlickerTest", "com.android.wm.shell.flicker.fundamentals.QuickSwitchBetweenDesktopAndFullscreenTest", "com.android.wm.shell.flicker.fundamentals.SwitchFocusBetweenAppsTest", "com.android.wm.shell.flicker.fundamentals.SwitchToDesktopFromOverviewFlickerTest", "com.android.wm.shell.flicker.fundamentals.SwitchToHomeFromDesktopTest", "com.android.wm.shell.flicker.fundamentals.SwitchToOverviewFromDesktopFlickerTest", "com.android.wm.shell.flicker.immersive.EnterImmersiveViaHeaderMenuFlickerTest", Loading Loading @@ -220,6 +221,13 @@ test_module_config { include_filters: ["com.android.wm.shell.flicker.fundamentals.SwitchFocusBetweenAppsTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-fundamentals-SwitchToDesktopFromOverviewFlickerTest", base: "WMShellFlickerTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.flicker.fundamentals.SwitchToDesktopFromOverviewFlickerTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-fundamentals-SwitchToHomeFromDesktopTest", base: "WMShellFlickerTestsDesktopMode", Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/fundamentals/SwitchToDesktopFromOverviewFlickerTest.kt 0 → 100644 +87 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.flicker.fundamentals import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.RequiresDesktopDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerChecker import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.FlickerBuilder import android.tools.flicker.FlickerTest import android.tools.flicker.FlickerTestFactory import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.utils.appWindowInsideDisplayBoundsAtEnd import com.android.wm.shell.flicker.utils.appWindowOnTopAtEnd import com.android.wm.shell.scenarios.EnterDesktopViaStaticDesktopOverviewTask import com.android.wm.shell.Utils import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Launch Desktop Mode from overview. */ @RequiresDesktopDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) @Postsubmit class SwitchToDesktopFromOverviewFlickerTest(flicker: FlickerTest) : DesktopModeBaseTest(flicker){ inner class SwitchToDesktopFromOverviewScenario : EnterDesktopViaStaticDesktopOverviewTask( rotation = flicker.scenario.startRotation ) val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = SwitchToDesktopFromOverviewScenario() private val testApp = scenario.desktopApp override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.enterDesktopViaStaticDesktopOverviewTask() } teardown { scenario.teardown() } } @Test fun appWindowIsVisibleAtEnd() = flicker.appWindowIsVisibleAtEnd(testApp) @Test fun appWindowInsideDisplayBoundsAtEnd() = flicker.appWindowInsideDisplayBoundsAtEnd(testApp) @Test fun appWindowOnTopAtEnd() = flicker.appWindowOnTopAtEnd(testApp) companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerChecker> { return FlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ test_module_config { "com.android.wm.shell.functional.fundamentals.OpenUnlimitedAppsTest", "com.android.wm.shell.functional.fundamentals.QuickSwitchBetweenDesktopAndFullscreenTest", "com.android.wm.shell.functional.fundamentals.SwitchFocusBetweenAppsTest", "com.android.wm.shell.functional.fundamentals.SwitchToDesktopFromOverviewTest", "com.android.wm.shell.functional.fundamentals.SwitchToHomeFromDesktopTest", "com.android.wm.shell.functional.fundamentals.SwitchToOverviewFromDesktopTest", "com.android.wm.shell.functional.fundamentals.TaskbarInDesktopModeTest", Loading Loading @@ -441,6 +442,13 @@ test_module_config { include_filters: ["com.android.wm.shell.functional.fundamentals.SwitchFocusBetweenAppsTest"], } test_module_config { name: "FunctionalTestsDesktopMode-fundamentals-SwitchToDesktopFromOverviewTest", base: "FunctionalTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.functional.fundamentals.SwitchToDesktopFromOverviewTest"], } test_module_config { name: "FunctionalTestsDesktopMode-fundamentals-SwitchToHomeFromDesktopTest", base: "FunctionalTestsDesktopMode", Loading libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/TEST_MAPPING +3 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,9 @@ { "name": "FunctionalTestsDesktopMode-fundamentals-SwitchFocusBetweenAppsTest" }, { "name": "FunctionalTestsDesktopMode-fundamentals-SwitchToDesktopFromOverviewTest" }, { "name": "FunctionalTestsDesktopMode-fundamentals-SwitchToHomeFromDesktopTest" }, Loading libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/fundamentals/SwitchToDesktopFromOverviewTest.kt 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.functional.fundamentals import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresDesktopDevice import android.platform.test.rule.ScreenRecordRule import com.android.wm.shell.scenarios.EnterDesktopViaStaticDesktopOverviewTask import org.junit.runner.RunWith import org.junit.runners.BlockJUnit4ClassRunner /* Functional test for [SwitchToDesktopFromOverview]. */ @RunWith(BlockJUnit4ClassRunner::class) @RequiresDesktopDevice @Presubmit @ScreenRecordRule.ScreenRecord class SwitchToDesktopFromOverviewTest : EnterDesktopViaStaticDesktopOverviewTask() No newline at end of file Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ test_module_config { "com.android.wm.shell.flicker.fundamentals.OpenUnlimitedAppsFlickerTest", "com.android.wm.shell.flicker.fundamentals.QuickSwitchBetweenDesktopAndFullscreenTest", "com.android.wm.shell.flicker.fundamentals.SwitchFocusBetweenAppsTest", "com.android.wm.shell.flicker.fundamentals.SwitchToDesktopFromOverviewFlickerTest", "com.android.wm.shell.flicker.fundamentals.SwitchToHomeFromDesktopTest", "com.android.wm.shell.flicker.fundamentals.SwitchToOverviewFromDesktopFlickerTest", "com.android.wm.shell.flicker.immersive.EnterImmersiveViaHeaderMenuFlickerTest", Loading Loading @@ -220,6 +221,13 @@ test_module_config { include_filters: ["com.android.wm.shell.flicker.fundamentals.SwitchFocusBetweenAppsTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-fundamentals-SwitchToDesktopFromOverviewFlickerTest", base: "WMShellFlickerTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.flicker.fundamentals.SwitchToDesktopFromOverviewFlickerTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-fundamentals-SwitchToHomeFromDesktopTest", base: "WMShellFlickerTestsDesktopMode", Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/fundamentals/SwitchToDesktopFromOverviewFlickerTest.kt 0 → 100644 +87 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.flicker.fundamentals import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.RequiresDesktopDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerChecker import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.FlickerBuilder import android.tools.flicker.FlickerTest import android.tools.flicker.FlickerTestFactory import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.utils.appWindowInsideDisplayBoundsAtEnd import com.android.wm.shell.flicker.utils.appWindowOnTopAtEnd import com.android.wm.shell.scenarios.EnterDesktopViaStaticDesktopOverviewTask import com.android.wm.shell.Utils import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Launch Desktop Mode from overview. */ @RequiresDesktopDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) @Postsubmit class SwitchToDesktopFromOverviewFlickerTest(flicker: FlickerTest) : DesktopModeBaseTest(flicker){ inner class SwitchToDesktopFromOverviewScenario : EnterDesktopViaStaticDesktopOverviewTask( rotation = flicker.scenario.startRotation ) val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = SwitchToDesktopFromOverviewScenario() private val testApp = scenario.desktopApp override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.enterDesktopViaStaticDesktopOverviewTask() } teardown { scenario.teardown() } } @Test fun appWindowIsVisibleAtEnd() = flicker.appWindowIsVisibleAtEnd(testApp) @Test fun appWindowInsideDisplayBoundsAtEnd() = flicker.appWindowInsideDisplayBoundsAtEnd(testApp) @Test fun appWindowOnTopAtEnd() = flicker.appWindowOnTopAtEnd(testApp) companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerChecker> { return FlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file
libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ test_module_config { "com.android.wm.shell.functional.fundamentals.OpenUnlimitedAppsTest", "com.android.wm.shell.functional.fundamentals.QuickSwitchBetweenDesktopAndFullscreenTest", "com.android.wm.shell.functional.fundamentals.SwitchFocusBetweenAppsTest", "com.android.wm.shell.functional.fundamentals.SwitchToDesktopFromOverviewTest", "com.android.wm.shell.functional.fundamentals.SwitchToHomeFromDesktopTest", "com.android.wm.shell.functional.fundamentals.SwitchToOverviewFromDesktopTest", "com.android.wm.shell.functional.fundamentals.TaskbarInDesktopModeTest", Loading Loading @@ -441,6 +442,13 @@ test_module_config { include_filters: ["com.android.wm.shell.functional.fundamentals.SwitchFocusBetweenAppsTest"], } test_module_config { name: "FunctionalTestsDesktopMode-fundamentals-SwitchToDesktopFromOverviewTest", base: "FunctionalTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.functional.fundamentals.SwitchToDesktopFromOverviewTest"], } test_module_config { name: "FunctionalTestsDesktopMode-fundamentals-SwitchToHomeFromDesktopTest", base: "FunctionalTestsDesktopMode", Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/TEST_MAPPING +3 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,9 @@ { "name": "FunctionalTestsDesktopMode-fundamentals-SwitchFocusBetweenAppsTest" }, { "name": "FunctionalTestsDesktopMode-fundamentals-SwitchToDesktopFromOverviewTest" }, { "name": "FunctionalTestsDesktopMode-fundamentals-SwitchToHomeFromDesktopTest" }, Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/fundamentals/SwitchToDesktopFromOverviewTest.kt 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.functional.fundamentals import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresDesktopDevice import android.platform.test.rule.ScreenRecordRule import com.android.wm.shell.scenarios.EnterDesktopViaStaticDesktopOverviewTask import org.junit.runner.RunWith import org.junit.runners.BlockJUnit4ClassRunner /* Functional test for [SwitchToDesktopFromOverview]. */ @RunWith(BlockJUnit4ClassRunner::class) @RequiresDesktopDevice @Presubmit @ScreenRecordRule.ScreenRecord class SwitchToDesktopFromOverviewTest : EnterDesktopViaStaticDesktopOverviewTask() No newline at end of file