Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/DesktopModeFlickerScenarios.kt +21 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAlways import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAtStart import android.tools.flicker.assertors.assertions.AppWindowAlignsWithOnlyOneDisplayCornerAtEnd import android.tools.flicker.assertors.assertions.AppWindowBecomesInvisible import android.tools.flicker.assertors.assertions.AppWindowBecomesPinned import android.tools.flicker.assertors.assertions.AppWindowBecomesTopWindow import android.tools.flicker.assertors.assertions.AppWindowBecomesVisible import android.tools.flicker.assertors.assertions.AppWindowCoversLeftHalfScreenAtEnd Loading Loading @@ -465,5 +466,25 @@ class DesktopModeFlickerScenarios { AppWindowIsVisibleAlways(SIMPLE_APP) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) val MINIMIZE_AUTO_PIP_APP = FlickerConfigEntry( scenarioId = ScenarioId("MINIMIZE_AUTO_PIP_APP"), extractor = ShellTransitionScenarioExtractor( transitionMatcher = object : ITransitionMatcher { override fun findAll( transitions: Collection<Transition> ): Collection<Transition> = transitions.filter { it.type == TransitionType.PIP } } ), assertions = AssertionTemplates.COMMON_ASSERTIONS + listOf( AppWindowBecomesPinned(DESKTOP_MODE_APP), ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }) ) } } libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/MinimizeAutoPipAppWindow.kt 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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 import android.tools.flicker.FlickerConfig import android.tools.flicker.annotation.ExpectedScenarios import android.tools.flicker.annotation.FlickerConfigProvider import android.tools.flicker.config.FlickerConfig import android.tools.flicker.config.FlickerServiceConfig import android.tools.flicker.junit.FlickerServiceJUnit4ClassRunner import com.android.wm.shell.flicker.DesktopModeFlickerScenarios.Companion.MINIMIZE_AUTO_PIP_APP import com.android.wm.shell.scenarios.MinimizeAutoPipAppWindow import org.junit.Test import org.junit.runner.RunWith @RunWith(FlickerServiceJUnit4ClassRunner::class) class MinimizeAutoPipAppWindow : MinimizeAutoPipAppWindow() { @ExpectedScenarios(["MINIMIZE_AUTO_PIP_APP"]) @Test override fun minimizePipAppWindow() = super.minimizePipAppWindow() companion object { @JvmStatic @FlickerConfigProvider fun flickerConfigProvider(): FlickerConfig = FlickerConfig().use(FlickerServiceConfig.DEFAULT).use(MINIMIZE_AUTO_PIP_APP) } } Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/DesktopModeFlickerScenarios.kt +21 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAlways import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAtStart import android.tools.flicker.assertors.assertions.AppWindowAlignsWithOnlyOneDisplayCornerAtEnd import android.tools.flicker.assertors.assertions.AppWindowBecomesInvisible import android.tools.flicker.assertors.assertions.AppWindowBecomesPinned import android.tools.flicker.assertors.assertions.AppWindowBecomesTopWindow import android.tools.flicker.assertors.assertions.AppWindowBecomesVisible import android.tools.flicker.assertors.assertions.AppWindowCoversLeftHalfScreenAtEnd Loading Loading @@ -465,5 +466,25 @@ class DesktopModeFlickerScenarios { AppWindowIsVisibleAlways(SIMPLE_APP) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) val MINIMIZE_AUTO_PIP_APP = FlickerConfigEntry( scenarioId = ScenarioId("MINIMIZE_AUTO_PIP_APP"), extractor = ShellTransitionScenarioExtractor( transitionMatcher = object : ITransitionMatcher { override fun findAll( transitions: Collection<Transition> ): Collection<Transition> = transitions.filter { it.type == TransitionType.PIP } } ), assertions = AssertionTemplates.COMMON_ASSERTIONS + listOf( AppWindowBecomesPinned(DESKTOP_MODE_APP), ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }) ) } }
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/MinimizeAutoPipAppWindow.kt 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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 import android.tools.flicker.FlickerConfig import android.tools.flicker.annotation.ExpectedScenarios import android.tools.flicker.annotation.FlickerConfigProvider import android.tools.flicker.config.FlickerConfig import android.tools.flicker.config.FlickerServiceConfig import android.tools.flicker.junit.FlickerServiceJUnit4ClassRunner import com.android.wm.shell.flicker.DesktopModeFlickerScenarios.Companion.MINIMIZE_AUTO_PIP_APP import com.android.wm.shell.scenarios.MinimizeAutoPipAppWindow import org.junit.Test import org.junit.runner.RunWith @RunWith(FlickerServiceJUnit4ClassRunner::class) class MinimizeAutoPipAppWindow : MinimizeAutoPipAppWindow() { @ExpectedScenarios(["MINIMIZE_AUTO_PIP_APP"]) @Test override fun minimizePipAppWindow() = super.minimizePipAppWindow() companion object { @JvmStatic @FlickerConfigProvider fun flickerConfigProvider(): FlickerConfig = FlickerConfig().use(FlickerServiceConfig.DEFAULT).use(MINIMIZE_AUTO_PIP_APP) } }