Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingDividerResizingAppsFlickerTest.kt 0 → 100644 +80 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.leftTiledAppLargerThanRightAtEnd import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtEnd import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtStart import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Tile two apps left and right with drag and ensure dragging the divider is resizing both apps. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingDividerResizingAppsFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() val leftApp = scenario.leftTestApp val rightApp = scenario.rightTestPipApp override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.snapTileAppsWithDrag() } transitions { scenario.resizeBothAppsLeftBigger() } teardown { scenario.teardown() } } @Test fun dividerVisibleAtStart() = flicker.tilingDividerIsVisibleAtStart() @Test fun dividerStaysVisibleAtEnd() = flicker.tilingDividerIsVisibleAtEnd() @Test fun leftAppLargerThanRight() = flicker.leftTiledAppLargerThanRightAtEnd(leftApp, rightApp) companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingDividerShownAfterHomeSwipeFlickerTest.kt 0 → 100644 +81 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.tilingDividerBecomesInvisibleThenVisible import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtEnd import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtStart import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Ensures tiling divider is shown after swiping to home and getting back to desktop mdoe. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingDividerShownAfterHomeSwipeFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.snapTileAppsWithDrag() } transitions { scenario.goHomeThenOverview() scenario.returnToDesktopMode() } teardown { scenario.teardown() } } @Test fun dividerInvisibleAtStart() = flicker.tilingDividerIsVisibleAtStart() @Test fun dividerBecomesVisibleAtEnd() = flicker.tilingDividerIsVisibleAtEnd() @Test fun dividerBecomesInvisibleThenVisible() = flicker.tilingDividerBecomesInvisibleThenVisible() companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingDividerShownAfterOverviewFlickerTest.kt 0 → 100644 +75 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.tilingDividerIsInvisibleAtStart import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtEnd import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Ensures tiling divider is shown after showing Overview and back to desktop mode. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingDividerShownAfterOverviewFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.snapTileAppsWithDrag() scenario.showOverview() scenario.returnToDesktopMode() } teardown { scenario.teardown() } } @Test fun dividerInvisibleAtStart() = flicker.tilingDividerIsInvisibleAtStart() @Test fun dividerBecomesVisibleAtEnd() = flicker.tilingDividerIsVisibleAtEnd() companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingDividerShownHiddenFlickerTest.kt 0 → 100644 +74 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.tilingDividerBecomesVisibleThenInvisible import com.android.wm.shell.flicker.utils.tilingDividerIsInvisibleAtStart import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Ensures tiling divider is hidden when an app is no longer tiled. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingDividerShownHiddenFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.snapTileAppsWithDrag() scenario.removeTiledApp(removeLeft = true) } teardown { scenario.teardown() } } @Test fun dividerInvisibleAtStart() = flicker.tilingDividerIsInvisibleAtStart() @Test fun dividerBecomesVisibleThenInvisible() = flicker.tilingDividerBecomesVisibleThenInvisible() companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingPairBrokenWhenEnteringPipFlickerTest.kt 0 → 100644 +78 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.tilingDividerIsInvisibleAtEnd import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtStart import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Ensures tiling is broken when a tiled task enters PiP. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingPairBrokenWhenEnteringPipFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.enablePipForRightApp() scenario.snapTileAppsWithDrag() } transitions { // Go home to enter pip. scenario.minimizePipApp() } teardown { scenario.teardown() } } @Test fun dividerInvisibleAtStart() = flicker.tilingDividerIsVisibleAtStart() @Test fun dividerBecomesVisibleAtEnd() = flicker.tilingDividerIsInvisibleAtEnd() companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingDividerResizingAppsFlickerTest.kt 0 → 100644 +80 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.leftTiledAppLargerThanRightAtEnd import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtEnd import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtStart import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Tile two apps left and right with drag and ensure dragging the divider is resizing both apps. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingDividerResizingAppsFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() val leftApp = scenario.leftTestApp val rightApp = scenario.rightTestPipApp override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.snapTileAppsWithDrag() } transitions { scenario.resizeBothAppsLeftBigger() } teardown { scenario.teardown() } } @Test fun dividerVisibleAtStart() = flicker.tilingDividerIsVisibleAtStart() @Test fun dividerStaysVisibleAtEnd() = flicker.tilingDividerIsVisibleAtEnd() @Test fun leftAppLargerThanRight() = flicker.leftTiledAppLargerThanRightAtEnd(leftApp, rightApp) companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingDividerShownAfterHomeSwipeFlickerTest.kt 0 → 100644 +81 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.tilingDividerBecomesInvisibleThenVisible import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtEnd import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtStart import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Ensures tiling divider is shown after swiping to home and getting back to desktop mdoe. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingDividerShownAfterHomeSwipeFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.snapTileAppsWithDrag() } transitions { scenario.goHomeThenOverview() scenario.returnToDesktopMode() } teardown { scenario.teardown() } } @Test fun dividerInvisibleAtStart() = flicker.tilingDividerIsVisibleAtStart() @Test fun dividerBecomesVisibleAtEnd() = flicker.tilingDividerIsVisibleAtEnd() @Test fun dividerBecomesInvisibleThenVisible() = flicker.tilingDividerBecomesInvisibleThenVisible() companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingDividerShownAfterOverviewFlickerTest.kt 0 → 100644 +75 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.tilingDividerIsInvisibleAtStart import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtEnd import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Ensures tiling divider is shown after showing Overview and back to desktop mode. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingDividerShownAfterOverviewFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.snapTileAppsWithDrag() scenario.showOverview() scenario.returnToDesktopMode() } teardown { scenario.teardown() } } @Test fun dividerInvisibleAtStart() = flicker.tilingDividerIsInvisibleAtStart() @Test fun dividerBecomesVisibleAtEnd() = flicker.tilingDividerIsVisibleAtEnd() companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingDividerShownHiddenFlickerTest.kt 0 → 100644 +74 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.tilingDividerBecomesVisibleThenInvisible import com.android.wm.shell.flicker.utils.tilingDividerIsInvisibleAtStart import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Ensures tiling divider is hidden when an app is no longer tiled. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingDividerShownHiddenFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() } transitions { scenario.snapTileAppsWithDrag() scenario.removeTiledApp(removeLeft = true) } teardown { scenario.teardown() } } @Test fun dividerInvisibleAtStart() = flicker.tilingDividerIsInvisibleAtStart() @Test fun dividerBecomesVisibleThenInvisible() = flicker.tilingDividerBecomesVisibleThenInvisible() companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/tiling/TilingPairBrokenWhenEnteringPipFlickerTest.kt 0 → 100644 +78 −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.tiling import android.platform.test.annotations.RequiresDevice import android.tools.NavBar import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.legacy.LegacyFlickerTestFactory import com.android.wm.shell.Utils import com.android.wm.shell.flicker.DesktopModeBaseTest import com.android.wm.shell.flicker.utils.tilingDividerIsInvisibleAtEnd import com.android.wm.shell.flicker.utils.tilingDividerIsVisibleAtStart import com.android.wm.shell.scenarios.TileResizingWithDrag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized /** * Ensures tiling is broken when a tiled task enters PiP. */ @RequiresDevice @RunWith(Parameterized::class) @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class) class TilingPairBrokenWhenEnteringPipFlickerTest(flicker: LegacyFlickerTest) : DesktopModeBaseTest(flicker) { @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, flicker.scenario.startRotation) val scenario = TileResizingWithDrag() override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.enablePipForRightApp() scenario.snapTileAppsWithDrag() } transitions { // Go home to enter pip. scenario.minimizePipApp() } teardown { scenario.teardown() } } @Test fun dividerInvisibleAtStart() = flicker.tilingDividerIsVisibleAtStart() @Test fun dividerBecomesVisibleAtEnd() = flicker.tilingDividerIsInvisibleAtEnd() companion object { @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection<FlickerTest> { return LegacyFlickerTestFactory.nonRotationTests( supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } } No newline at end of file