Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ test_module_config { base: "WMShellFlickerTestsDesktopMode", test_suites: ["device-tests"], exclude_filters: [ "com.android.wm.shell.flicker.appcompat.ResizeActivityEmbeddedAppToMinimumWindowFlickerTest", "com.android.wm.shell.flicker.appcompat.ShowAppDialogInDesktopModeFlickerTest", "com.android.wm.shell.flicker.exit.ExitDesktopToFullScreenWithAppHeaderMenuFlickerTest", "com.android.wm.shell.flicker.exit.ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest", Loading Loading @@ -106,6 +107,13 @@ test_module_config { ], } test_module_config { name: "WMShellFlickerTestsDesktopMode-appcompat-ResizeActivityEmbeddedAppToMinimumWindowFlickerTest", base: "WMShellFlickerTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.flicker.appcompat.ResizeActivityEmbeddedAppToMinimumWindowFlickerTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-appcompat-ShowAppDialogInDesktopModeFlickerTest", base: "WMShellFlickerTestsDesktopMode", Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/appcompat/ResizeActivityEmbeddedAppToMinimumWindowFlickerTest.kt 0 → 100644 +86 −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.appcompat import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.RequiresDesktopDevice import android.tools.NavBar import android.tools.flicker.FlickerBuilder import android.tools.flicker.FlickerTest import android.tools.flicker.FlickerTestFactory import android.tools.flicker.assertions.FlickerChecker import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.traces.component.ComponentNameMatcher import android.tools.traces.component.IComponentNameMatcher import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.utils.appWindowIsVisibleAtStart import com.android.wm.shell.flicker.utils.layerBecomesInvisible import com.android.wm.shell.scenarios.ResizeActivityEmbeddedAppToMinimumWindow import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Resize the activity embedding app window to the smallest possible height and width by dragging * with the corner. * * Assert that the maximum window size content in the two-pane format, minimum window size content * in the one-pane format. */ @RequiresDesktopDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) @Postsubmit class ResizeActivityEmbeddedAppToMinimumWindowFlickerTest(flicker: FlickerTest) : DesktopModeBaseTest(flicker) { inner class ResizeActivityEmbeddedAppToMinimumWindowScenario : ResizeActivityEmbeddedAppToMinimumWindow(flicker.scenario.startRotation) @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = ResizeActivityEmbeddedAppToMinimumWindowScenario() private val mainPaneMatcher = scenario.settingsApp private val subPaneMatcher: IComponentNameMatcher = ComponentNameMatcher.SETTINGS_NETWORK_ACTIVITY override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.resizeAppWithCornerResize() } teardown { scenario.teardown() } } @Test fun mainPaneIsVisibleAtStart() = flicker.appWindowIsVisibleAtStart(mainPaneMatcher) @Test fun mainPaneIsVisibleAtEnd() = flicker.appWindowIsVisibleAtEnd(mainPaneMatcher) @Test fun subPaneBecomesInvisible() = flicker.layerBecomesInvisible(subPaneMatcher) 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 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ test_module_config { "com.android.wm.shell.functional.UnmaximizeAppWindowTest", "com.android.wm.shell.functional.UnminimizeAppFromAllAppsTest", "com.android.wm.shell.functional.UnminimizeAppFromTaskbarTest", "com.android.wm.shell.functional.appcompat.ResizeActivityEmbeddedAppToMinimumWindowTest", "com.android.wm.shell.functional.appcompat.ShowAppDialogInDesktopModeTest", "com.android.wm.shell.functional.exit.ExitDesktopToFullScreenWithAppHeaderMenuTest", "com.android.wm.shell.functional.exit.ExitDesktopToSplitScreenWithAppHeaderMenuTest", Loading Loading @@ -302,6 +303,13 @@ test_module_config { include_filters: ["com.android.wm.shell.functional.UnminimizeAppFromTaskbarTest"], } test_module_config { name: "FunctionalTestsDesktopMode-appcompat-ResizeActivityEmbeddedAppToMinimumWindowTest", base: "FunctionalTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.functional.appcompat.ResizeActivityEmbeddedAppToMinimumWindowTest"], } test_module_config { name: "FunctionalTestsDesktopMode-appcompat-ShowAppDialogInDesktopModeTest", base: "FunctionalTestsDesktopMode", Loading libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/TEST_MAPPING +3 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,9 @@ { "name": "FunctionalTestsDesktopMode-UnminimizeAppFromTaskbarTest" }, { "name": "FunctionalTestsDesktopMode-appcompat-ResizeActivityEmbeddedAppToMinimumWindowTest" }, { "name": "FunctionalTestsDesktopMode-appcompat-ShowAppDialogInDesktopModeTest" }, Loading libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/appcompat/ResizeActivityEmbeddedAppToMinimumWindowTest.kt 0 → 100644 +32 −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.appcompat import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresDesktopDevice import android.platform.test.rule.ScreenRecordRule import com.android.wm.shell.scenarios.ResizeActivityEmbeddedAppToMinimumWindow import org.junit.runner.RunWith import org.junit.runners.BlockJUnit4ClassRunner /* Functional test for [ResizeActivityEmbeddedAppToMinimumWindow]. */ @RunWith(BlockJUnit4ClassRunner::class) @RequiresDesktopDevice @Presubmit @ScreenRecordRule.ScreenRecord class ResizeActivityEmbeddedAppToMinimumWindowTest : ResizeActivityEmbeddedAppToMinimumWindow() Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ test_module_config { base: "WMShellFlickerTestsDesktopMode", test_suites: ["device-tests"], exclude_filters: [ "com.android.wm.shell.flicker.appcompat.ResizeActivityEmbeddedAppToMinimumWindowFlickerTest", "com.android.wm.shell.flicker.appcompat.ShowAppDialogInDesktopModeFlickerTest", "com.android.wm.shell.flicker.exit.ExitDesktopToFullScreenWithAppHeaderMenuFlickerTest", "com.android.wm.shell.flicker.exit.ExitDesktopToFullScreenWithDragToTopDragZoneFlickerTest", Loading Loading @@ -106,6 +107,13 @@ test_module_config { ], } test_module_config { name: "WMShellFlickerTestsDesktopMode-appcompat-ResizeActivityEmbeddedAppToMinimumWindowFlickerTest", base: "WMShellFlickerTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.flicker.appcompat.ResizeActivityEmbeddedAppToMinimumWindowFlickerTest"], } test_module_config { name: "WMShellFlickerTestsDesktopMode-appcompat-ShowAppDialogInDesktopModeFlickerTest", base: "WMShellFlickerTestsDesktopMode", Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/appcompat/ResizeActivityEmbeddedAppToMinimumWindowFlickerTest.kt 0 → 100644 +86 −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.appcompat import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.RequiresDesktopDevice import android.tools.NavBar import android.tools.flicker.FlickerBuilder import android.tools.flicker.FlickerTest import android.tools.flicker.FlickerTestFactory import android.tools.flicker.assertions.FlickerChecker import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.traces.component.ComponentNameMatcher import android.tools.traces.component.IComponentNameMatcher import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.utils.appWindowIsVisibleAtStart import com.android.wm.shell.flicker.utils.layerBecomesInvisible import com.android.wm.shell.scenarios.ResizeActivityEmbeddedAppToMinimumWindow import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Resize the activity embedding app window to the smallest possible height and width by dragging * with the corner. * * Assert that the maximum window size content in the two-pane format, minimum window size content * in the one-pane format. */ @RequiresDesktopDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) @Postsubmit class ResizeActivityEmbeddedAppToMinimumWindowFlickerTest(flicker: FlickerTest) : DesktopModeBaseTest(flicker) { inner class ResizeActivityEmbeddedAppToMinimumWindowScenario : ResizeActivityEmbeddedAppToMinimumWindow(flicker.scenario.startRotation) @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = ResizeActivityEmbeddedAppToMinimumWindowScenario() private val mainPaneMatcher = scenario.settingsApp private val subPaneMatcher: IComponentNameMatcher = ComponentNameMatcher.SETTINGS_NETWORK_ACTIVITY override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.resizeAppWithCornerResize() } teardown { scenario.teardown() } } @Test fun mainPaneIsVisibleAtStart() = flicker.appWindowIsVisibleAtStart(mainPaneMatcher) @Test fun mainPaneIsVisibleAtEnd() = flicker.appWindowIsVisibleAtEnd(mainPaneMatcher) @Test fun subPaneBecomesInvisible() = flicker.layerBecomesInvisible(subPaneMatcher) 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 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ test_module_config { "com.android.wm.shell.functional.UnmaximizeAppWindowTest", "com.android.wm.shell.functional.UnminimizeAppFromAllAppsTest", "com.android.wm.shell.functional.UnminimizeAppFromTaskbarTest", "com.android.wm.shell.functional.appcompat.ResizeActivityEmbeddedAppToMinimumWindowTest", "com.android.wm.shell.functional.appcompat.ShowAppDialogInDesktopModeTest", "com.android.wm.shell.functional.exit.ExitDesktopToFullScreenWithAppHeaderMenuTest", "com.android.wm.shell.functional.exit.ExitDesktopToSplitScreenWithAppHeaderMenuTest", Loading Loading @@ -302,6 +303,13 @@ test_module_config { include_filters: ["com.android.wm.shell.functional.UnminimizeAppFromTaskbarTest"], } test_module_config { name: "FunctionalTestsDesktopMode-appcompat-ResizeActivityEmbeddedAppToMinimumWindowTest", base: "FunctionalTestsDesktopMode", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.functional.appcompat.ResizeActivityEmbeddedAppToMinimumWindowTest"], } test_module_config { name: "FunctionalTestsDesktopMode-appcompat-ShowAppDialogInDesktopModeTest", base: "FunctionalTestsDesktopMode", Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/TEST_MAPPING +3 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,9 @@ { "name": "FunctionalTestsDesktopMode-UnminimizeAppFromTaskbarTest" }, { "name": "FunctionalTestsDesktopMode-appcompat-ResizeActivityEmbeddedAppToMinimumWindowTest" }, { "name": "FunctionalTestsDesktopMode-appcompat-ShowAppDialogInDesktopModeTest" }, Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/appcompat/ResizeActivityEmbeddedAppToMinimumWindowTest.kt 0 → 100644 +32 −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.appcompat import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresDesktopDevice import android.platform.test.rule.ScreenRecordRule import com.android.wm.shell.scenarios.ResizeActivityEmbeddedAppToMinimumWindow import org.junit.runner.RunWith import org.junit.runners.BlockJUnit4ClassRunner /* Functional test for [ResizeActivityEmbeddedAppToMinimumWindow]. */ @RunWith(BlockJUnit4ClassRunner::class) @RequiresDesktopDevice @Presubmit @ScreenRecordRule.ScreenRecord class ResizeActivityEmbeddedAppToMinimumWindowTest : ResizeActivityEmbeddedAppToMinimumWindow()