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.SwitchToOverviewFromDesktopFlickerTest", "com.android.wm.shell.flicker.keyboardshortcuts.EnterDesktopFromKeyboardShortcutFlickerTest", "com.android.wm.shell.flicker.keyboardshortcuts.ExitDesktopToFullScreenWithKeyboardShortcutFlickerTest", "com.android.wm.shell.flicker.maximize.ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest", "com.android.wm.shell.flicker.maximize.MaximizeAppDoubleTapAppHeaderFlickerTest", "com.android.wm.shell.flicker.maximize.MaximizeAppFlickerTest", "com.android.wm.shell.flicker.maximize.MaximizeAppNonResizableFlickerTest", Loading Loading @@ -211,6 +212,13 @@ test_module_config { include_filters: ["com.android.wm.shell.flicker.keyboardshortcuts.ExitDesktopToFullScreenWithKeyboardShortcutFlickerTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-maximize-ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest", base: "WMShellFlickerTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.flicker.maximize.ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-maximize-MaximizeAppDoubleTapAppHeaderFlickerTest", base: "WMShellFlickerTestsDesktopMode", Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/TEST_MAPPING +3 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,9 @@ { "name": "WMShellFlickerTestsDesktopMode-keyboardshortcuts-ExitDesktopToFullScreenWithKeyboardShortcutFlickerTest" }, { "name": "WMShellFlickerTestsDesktopMode-maximize-ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest" }, { "name": "WMShellFlickerTestsDesktopMode-maximize-MaximizeAppDoubleTapAppHeaderFlickerTest" }, Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/maximize/ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest.kt 0 → 100644 +89 −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.maximize import androidx.test.filters.RequiresDevice 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 android.tools.traces.component.ComponentNameMatcher.Companion.DESKTOP_WALLPAPER_ACTIVITY import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.appWindowBecomesInvisible import com.android.wm.shell.flicker.utils.appWindowOnTopAtStart import com.android.wm.shell.flicker.utils.appWindowOnTopAtEnd import com.android.wm.shell.flicker.utils.layerCoversFullScreenAtEnd import com.android.wm.shell.scenarios.ExitDesktopWithDragToTopDragZone import com.android.wm.shell.Utils import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Exit the app in desktop mode to full screen by dragging it to the top drag zone. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest(flicker: FlickerTest) : DesktopModeBaseTest(flicker) { inner class ExitDesktopToFullScreenWithDragToTopDragZoneScenario : ExitDesktopWithDragToTopDragZone(flicker.scenario.startRotation) @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = ExitDesktopToFullScreenWithDragToTopDragZoneScenario() private val testApp = scenario.testApp override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.exitDesktopWithDragToTopDragZone() } teardown { scenario.teardown() } } @Test fun appWindowOnTopAtStart() = flicker.appWindowOnTopAtStart(testApp) @Test fun appWindowOnTopAtEnd() = flicker.appWindowOnTopAtEnd(testApp) @Test fun layerCoversFullScreenAtEnd() = flicker.layerCoversFullScreenAtEnd(testApp) @Test fun wallpaperBecomesInvisible() = flicker.appWindowBecomesInvisible(DESKTOP_WALLPAPER_ACTIVITY) companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerChecker> { return FlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/Android.bp +8 −8 Original line number Diff line number Diff line Loading @@ -94,7 +94,6 @@ test_module_config { "com.android.wm.shell.functional.EnterDesktopViaStaticDesktopOverviewTaskTest", "com.android.wm.shell.functional.EnterDesktopWithDragExistingWindowsTest", "com.android.wm.shell.functional.EnterDesktopWithDragWindowsLimitTest", "com.android.wm.shell.functional.ExitDesktopWithDragToTopDragZoneTest", "com.android.wm.shell.functional.FocusAppFromAllAppsTest", "com.android.wm.shell.functional.FocusAppFromTaskbarTest", "com.android.wm.shell.functional.MinimizeAppWindowsTest", Loading Loading @@ -132,6 +131,7 @@ test_module_config { "com.android.wm.shell.functional.fundamentals.focus.OpenAndFocusTest", "com.android.wm.shell.functional.keyboardshortcuts.EnterDesktopFromKeyboardShortcutTest", "com.android.wm.shell.functional.keyboardshortcuts.ExitDesktopFromKeyboardShortcutTest", "com.android.wm.shell.functional.maximize.ExitDesktopWithDragToTopDragZoneTest", "com.android.wm.shell.functional.maximize.MaximizeAppWindowTest", "com.android.wm.shell.functional.maximize.MaximizeAppWindowWithDragToTopDragZoneInDesktopFirstTest", "com.android.wm.shell.functional.maximize.MaximizeAppWindowWithDragToTopDragZoneTest", Loading Loading @@ -216,13 +216,6 @@ test_module_config { include_filters: ["com.android.wm.shell.functional.EnterDesktopWithDragWindowsLimitTest"], } test_module_config { name: "FunctionalTestsDesktopMode-ExitDesktopWithDragToTopDragZoneTest", base: "FunctionalTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.functional.ExitDesktopWithDragToTopDragZoneTest"], } test_module_config { name: "FunctionalTestsDesktopMode-FocusAppFromAllAppsTest", base: "FunctionalTestsDesktopMode", Loading Loading @@ -482,6 +475,13 @@ test_module_config { include_filters: ["com.android.wm.shell.functional.keyboardshortcuts.ExitDesktopFromKeyboardShortcutTest"], } test_module_config { name: "FunctionalTestsDesktopMode-maximize-ExitDesktopWithDragToTopDragZoneTest", base: "FunctionalTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.functional.maximize.ExitDesktopWithDragToTopDragZoneTest"], } test_module_config { name: "FunctionalTestsDesktopMode-maximize-MaximizeAppWindowTest", base: "FunctionalTestsDesktopMode", Loading libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/TEST_MAPPING +3 −3 Original line number Diff line number Diff line Loading @@ -45,9 +45,6 @@ { "name": "FunctionalTestsDesktopMode-EnterDesktopWithDragWindowsLimitTest" }, { "name": "FunctionalTestsDesktopMode-ExitDesktopWithDragToTopDragZoneTest" }, { "name": "FunctionalTestsDesktopMode-FocusAppFromAllAppsTest" }, Loading Loading @@ -159,6 +156,9 @@ { "name": "FunctionalTestsDesktopMode-keyboardshortcuts-ExitDesktopFromKeyboardShortcutTest" }, { "name": "FunctionalTestsDesktopMode-maximize-ExitDesktopWithDragToTopDragZoneTest" }, { "name": "FunctionalTestsDesktopMode-maximize-MaximizeAppWindowTest" }, Loading 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.SwitchToOverviewFromDesktopFlickerTest", "com.android.wm.shell.flicker.keyboardshortcuts.EnterDesktopFromKeyboardShortcutFlickerTest", "com.android.wm.shell.flicker.keyboardshortcuts.ExitDesktopToFullScreenWithKeyboardShortcutFlickerTest", "com.android.wm.shell.flicker.maximize.ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest", "com.android.wm.shell.flicker.maximize.MaximizeAppDoubleTapAppHeaderFlickerTest", "com.android.wm.shell.flicker.maximize.MaximizeAppFlickerTest", "com.android.wm.shell.flicker.maximize.MaximizeAppNonResizableFlickerTest", Loading Loading @@ -211,6 +212,13 @@ test_module_config { include_filters: ["com.android.wm.shell.flicker.keyboardshortcuts.ExitDesktopToFullScreenWithKeyboardShortcutFlickerTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-maximize-ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest", base: "WMShellFlickerTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.flicker.maximize.ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-maximize-MaximizeAppDoubleTapAppHeaderFlickerTest", base: "WMShellFlickerTestsDesktopMode", Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/TEST_MAPPING +3 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,9 @@ { "name": "WMShellFlickerTestsDesktopMode-keyboardshortcuts-ExitDesktopToFullScreenWithKeyboardShortcutFlickerTest" }, { "name": "WMShellFlickerTestsDesktopMode-maximize-ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest" }, { "name": "WMShellFlickerTestsDesktopMode-maximize-MaximizeAppDoubleTapAppHeaderFlickerTest" }, Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/maximize/ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest.kt 0 → 100644 +89 −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.maximize import androidx.test.filters.RequiresDevice 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 android.tools.traces.component.ComponentNameMatcher.Companion.DESKTOP_WALLPAPER_ACTIVITY import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.appWindowBecomesInvisible import com.android.wm.shell.flicker.utils.appWindowOnTopAtStart import com.android.wm.shell.flicker.utils.appWindowOnTopAtEnd import com.android.wm.shell.flicker.utils.layerCoversFullScreenAtEnd import com.android.wm.shell.scenarios.ExitDesktopWithDragToTopDragZone import com.android.wm.shell.Utils import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Exit the app in desktop mode to full screen by dragging it to the top drag zone. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest(flicker: FlickerTest) : DesktopModeBaseTest(flicker) { inner class ExitDesktopToFullScreenWithDragToTopDragZoneScenario : ExitDesktopWithDragToTopDragZone(flicker.scenario.startRotation) @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = ExitDesktopToFullScreenWithDragToTopDragZoneScenario() private val testApp = scenario.testApp override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.exitDesktopWithDragToTopDragZone() } teardown { scenario.teardown() } } @Test fun appWindowOnTopAtStart() = flicker.appWindowOnTopAtStart(testApp) @Test fun appWindowOnTopAtEnd() = flicker.appWindowOnTopAtEnd(testApp) @Test fun layerCoversFullScreenAtEnd() = flicker.layerCoversFullScreenAtEnd(testApp) @Test fun wallpaperBecomesInvisible() = flicker.appWindowBecomesInvisible(DESKTOP_WALLPAPER_ACTIVITY) companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerChecker> { return FlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } }
libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/Android.bp +8 −8 Original line number Diff line number Diff line Loading @@ -94,7 +94,6 @@ test_module_config { "com.android.wm.shell.functional.EnterDesktopViaStaticDesktopOverviewTaskTest", "com.android.wm.shell.functional.EnterDesktopWithDragExistingWindowsTest", "com.android.wm.shell.functional.EnterDesktopWithDragWindowsLimitTest", "com.android.wm.shell.functional.ExitDesktopWithDragToTopDragZoneTest", "com.android.wm.shell.functional.FocusAppFromAllAppsTest", "com.android.wm.shell.functional.FocusAppFromTaskbarTest", "com.android.wm.shell.functional.MinimizeAppWindowsTest", Loading Loading @@ -132,6 +131,7 @@ test_module_config { "com.android.wm.shell.functional.fundamentals.focus.OpenAndFocusTest", "com.android.wm.shell.functional.keyboardshortcuts.EnterDesktopFromKeyboardShortcutTest", "com.android.wm.shell.functional.keyboardshortcuts.ExitDesktopFromKeyboardShortcutTest", "com.android.wm.shell.functional.maximize.ExitDesktopWithDragToTopDragZoneTest", "com.android.wm.shell.functional.maximize.MaximizeAppWindowTest", "com.android.wm.shell.functional.maximize.MaximizeAppWindowWithDragToTopDragZoneInDesktopFirstTest", "com.android.wm.shell.functional.maximize.MaximizeAppWindowWithDragToTopDragZoneTest", Loading Loading @@ -216,13 +216,6 @@ test_module_config { include_filters: ["com.android.wm.shell.functional.EnterDesktopWithDragWindowsLimitTest"], } test_module_config { name: "FunctionalTestsDesktopMode-ExitDesktopWithDragToTopDragZoneTest", base: "FunctionalTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.functional.ExitDesktopWithDragToTopDragZoneTest"], } test_module_config { name: "FunctionalTestsDesktopMode-FocusAppFromAllAppsTest", base: "FunctionalTestsDesktopMode", Loading Loading @@ -482,6 +475,13 @@ test_module_config { include_filters: ["com.android.wm.shell.functional.keyboardshortcuts.ExitDesktopFromKeyboardShortcutTest"], } test_module_config { name: "FunctionalTestsDesktopMode-maximize-ExitDesktopWithDragToTopDragZoneTest", base: "FunctionalTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.functional.maximize.ExitDesktopWithDragToTopDragZoneTest"], } test_module_config { name: "FunctionalTestsDesktopMode-maximize-MaximizeAppWindowTest", base: "FunctionalTestsDesktopMode", Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/TEST_MAPPING +3 −3 Original line number Diff line number Diff line Loading @@ -45,9 +45,6 @@ { "name": "FunctionalTestsDesktopMode-EnterDesktopWithDragWindowsLimitTest" }, { "name": "FunctionalTestsDesktopMode-ExitDesktopWithDragToTopDragZoneTest" }, { "name": "FunctionalTestsDesktopMode-FocusAppFromAllAppsTest" }, Loading Loading @@ -159,6 +156,9 @@ { "name": "FunctionalTestsDesktopMode-keyboardshortcuts-ExitDesktopFromKeyboardShortcutTest" }, { "name": "FunctionalTestsDesktopMode-maximize-ExitDesktopWithDragToTopDragZoneTest" }, { "name": "FunctionalTestsDesktopMode-maximize-MaximizeAppWindowTest" }, Loading