Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/DesktopModeBaseTest.kt +13 −1 Original line number Diff line number Diff line Loading @@ -17,8 +17,10 @@ package com.android.wm.shell.flicker import android.platform.test.rule.ScreenRecordRule import android.tools.PlatformConsts.DEFAULT_DISPLAY import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.rules.ChangeDisplayOrientationRule import androidx.test.uiautomator.UiDevice import org.junit.Assume import org.junit.Before Loading @@ -31,6 +33,7 @@ import com.android.server.wm.flicker.statusBarLayerPositionAtStartAndEnd import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible import com.android.server.wm.flicker.taskBarLayerIsVisibleAtStartAndEnd import com.android.server.wm.flicker.taskBarWindowIsAlwaysVisible import com.android.wm.shell.shared.desktopmode.DesktopState import org.junit.ClassRule /** Loading @@ -52,11 +55,20 @@ abstract class DesktopModeBaseTest(flicker: LegacyFlickerTest) : BaseBenchmarkTe // Override this set with the test method names that you want to exclude from the test open val excludedTests: Set<String> = emptySet() private val device = UiDevice.getInstance(instrumentation) @Before fun setUp() { Assume.assumeTrue( DesktopState.fromContext(instrumentation.context) .isDesktopModeSupportedOnDisplay(DEFAULT_DISPLAY) ) tapl.setEnableRotation(true) tapl.setExpectedRotation(flicker.scenario.startRotation.value) ChangeDisplayOrientationRule.setRotation(flicker.scenario.startRotation) Assume.assumeTrue(tapl.isTablet) device.executeShellCommand( "dumpsys activity service SystemUIService WMShell desktopmode removeAllDesks" ) val currentTestMethodName = testName.methodName Assume.assumeFalse( Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/fundamentals/EnterDesktopWithAppHandleMenuFlickerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ class EnterDesktopWithAppHandleMenuFlickerTest(flicker: LegacyFlickerTest) : override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.baseSetup() } transitions { scenario.enterDesktopWithAppHandleMenu() Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/fundamentals/EnterDesktopWithDragFlickerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class EnterDesktopWithDragFlickerTest(flicker: LegacyFlickerTest) : override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.baseSetup() } transitions { scenario.enterDesktopWithDrag() Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/fundamentals/EnterSplitScreenWithAppHandleMenuFlickerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ class EnterSplitScreenWithAppHandleMenuFlickerTest(flicker: LegacyFlickerTest) : override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.baseSetup() } transitions { scenario.enterSplitScreenFromAppHandle() Loading libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/AltTabSwitchInDesktopMode.kt +1 −20 Original line number Diff line number Diff line Loading @@ -17,9 +17,6 @@ package com.android.wm.shell.scenarios import android.app.Instrumentation import android.tools.flicker.rules.ChangeDisplayOrientationRule import android.tools.NavBar import android.tools.PlatformConsts.DEFAULT_DISPLAY import android.tools.Rotation import android.tools.traces.parsers.WindowManagerStateHelper import androidx.test.platform.app.InstrumentationRegistry Loading @@ -29,20 +26,15 @@ import com.android.server.wm.flicker.helpers.DesktopModeAppHelper import com.android.server.wm.flicker.helpers.MailAppHelper import com.android.server.wm.flicker.helpers.NewTasksAppHelper import com.android.server.wm.flicker.helpers.SimpleAppHelper import com.android.window.flags.Flags import com.android.wm.shell.Utils import com.android.wm.shell.shared.desktopmode.DesktopState import org.junit.After import org.junit.Assume import org.junit.Before import org.junit.Ignore import org.junit.Rule import org.junit.Test @Ignore("Test Base Class") abstract class AltTabSwitchInDesktopMode( val rotation: Rotation = Rotation.ROTATION_0 ) : TestScenarioBase() { ) : TestScenarioBase(rotation) { private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation() private val tapl = LauncherInstrumentation() Loading @@ -52,19 +44,8 @@ abstract class AltTabSwitchInDesktopMode( private val secondApp = MailAppHelper(instrumentation) private val thirdApp = NewTasksAppHelper(instrumentation) @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, rotation) @Before fun setup() { Assume.assumeTrue( DesktopState.fromContext(instrumentation.context) .isDesktopModeSupportedOnDisplay(DEFAULT_DISPLAY) ) tapl.setEnableRotation(true) tapl.setExpectedRotation(rotation.value) tapl.enableTransientTaskbar(false) ChangeDisplayOrientationRule.setRotation(rotation) firstApp.enterDesktopMode(wmHelper, device) secondApp.launchViaIntent(wmHelper) thirdApp.launchViaIntent(wmHelper) Loading Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/DesktopModeBaseTest.kt +13 −1 Original line number Diff line number Diff line Loading @@ -17,8 +17,10 @@ package com.android.wm.shell.flicker import android.platform.test.rule.ScreenRecordRule import android.tools.PlatformConsts.DEFAULT_DISPLAY import android.tools.flicker.legacy.LegacyFlickerTest import android.tools.flicker.rules.ChangeDisplayOrientationRule import androidx.test.uiautomator.UiDevice import org.junit.Assume import org.junit.Before Loading @@ -31,6 +33,7 @@ import com.android.server.wm.flicker.statusBarLayerPositionAtStartAndEnd import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible import com.android.server.wm.flicker.taskBarLayerIsVisibleAtStartAndEnd import com.android.server.wm.flicker.taskBarWindowIsAlwaysVisible import com.android.wm.shell.shared.desktopmode.DesktopState import org.junit.ClassRule /** Loading @@ -52,11 +55,20 @@ abstract class DesktopModeBaseTest(flicker: LegacyFlickerTest) : BaseBenchmarkTe // Override this set with the test method names that you want to exclude from the test open val excludedTests: Set<String> = emptySet() private val device = UiDevice.getInstance(instrumentation) @Before fun setUp() { Assume.assumeTrue( DesktopState.fromContext(instrumentation.context) .isDesktopModeSupportedOnDisplay(DEFAULT_DISPLAY) ) tapl.setEnableRotation(true) tapl.setExpectedRotation(flicker.scenario.startRotation.value) ChangeDisplayOrientationRule.setRotation(flicker.scenario.startRotation) Assume.assumeTrue(tapl.isTablet) device.executeShellCommand( "dumpsys activity service SystemUIService WMShell desktopmode removeAllDesks" ) val currentTestMethodName = testName.methodName Assume.assumeFalse( Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/fundamentals/EnterDesktopWithAppHandleMenuFlickerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ class EnterDesktopWithAppHandleMenuFlickerTest(flicker: LegacyFlickerTest) : override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.baseSetup() } transitions { scenario.enterDesktopWithAppHandleMenu() Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/fundamentals/EnterDesktopWithDragFlickerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class EnterDesktopWithDragFlickerTest(flicker: LegacyFlickerTest) : override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.baseSetup() } transitions { scenario.enterDesktopWithDrag() Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/fundamentals/EnterSplitScreenWithAppHandleMenuFlickerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ class EnterSplitScreenWithAppHandleMenuFlickerTest(flicker: LegacyFlickerTest) : override val transition: FlickerBuilder.() -> Unit get() = { setup { scenario.setup() scenario.baseSetup() } transitions { scenario.enterSplitScreenFromAppHandle() Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/AltTabSwitchInDesktopMode.kt +1 −20 Original line number Diff line number Diff line Loading @@ -17,9 +17,6 @@ package com.android.wm.shell.scenarios import android.app.Instrumentation import android.tools.flicker.rules.ChangeDisplayOrientationRule import android.tools.NavBar import android.tools.PlatformConsts.DEFAULT_DISPLAY import android.tools.Rotation import android.tools.traces.parsers.WindowManagerStateHelper import androidx.test.platform.app.InstrumentationRegistry Loading @@ -29,20 +26,15 @@ import com.android.server.wm.flicker.helpers.DesktopModeAppHelper import com.android.server.wm.flicker.helpers.MailAppHelper import com.android.server.wm.flicker.helpers.NewTasksAppHelper import com.android.server.wm.flicker.helpers.SimpleAppHelper import com.android.window.flags.Flags import com.android.wm.shell.Utils import com.android.wm.shell.shared.desktopmode.DesktopState import org.junit.After import org.junit.Assume import org.junit.Before import org.junit.Ignore import org.junit.Rule import org.junit.Test @Ignore("Test Base Class") abstract class AltTabSwitchInDesktopMode( val rotation: Rotation = Rotation.ROTATION_0 ) : TestScenarioBase() { ) : TestScenarioBase(rotation) { private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation() private val tapl = LauncherInstrumentation() Loading @@ -52,19 +44,8 @@ abstract class AltTabSwitchInDesktopMode( private val secondApp = MailAppHelper(instrumentation) private val thirdApp = NewTasksAppHelper(instrumentation) @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, rotation) @Before fun setup() { Assume.assumeTrue( DesktopState.fromContext(instrumentation.context) .isDesktopModeSupportedOnDisplay(DEFAULT_DISPLAY) ) tapl.setEnableRotation(true) tapl.setExpectedRotation(rotation.value) tapl.enableTransientTaskbar(false) ChangeDisplayOrientationRule.setRotation(rotation) firstApp.enterDesktopMode(wmHelper, device) secondApp.launchViaIntent(wmHelper) thirdApp.launchViaIntent(wmHelper) Loading