Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79174513 authored by Saho Kobayashi's avatar Saho Kobayashi Committed by Android (Google) Code Review
Browse files

Merge "Change app launch timing to fix test failure" into main

parents 0a41921d de890628
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.wm.shell.scenarios
package com.android.wm.shell.scenarios


import android.platform.test.annotations.EnableFlags
import android.platform.test.annotations.EnableFlags
import android.platform.test.annotations.RequiresFlagsEnabled
import android.tools.traces.parsers.WindowManagerStateHelper
import android.tools.traces.parsers.WindowManagerStateHelper
import android.view.KeyEvent.KEYCODE_MINUS
import android.view.KeyEvent.KEYCODE_MINUS
import android.view.KeyEvent.META_META_ON
import android.view.KeyEvent.META_META_ON
@@ -39,6 +40,10 @@ import platform.test.desktop.SimulatedConnectedDisplayTestRule
 * Base scenario test to test if the window moved to next display via keyboard keeps the focus.
 * Base scenario test to test if the window moved to next display via keyboard keeps the focus.
 */
 */
@Ignore("Test Base Class")
@Ignore("Test Base Class")
@RequiresFlagsEnabled(
    Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
    Flags.FLAG_ENABLE_MOVE_TO_NEXT_DISPLAY_SHORTCUT
)
@EnableFlags(
@EnableFlags(
    Flags.FLAG_ENABLE_DISPLAY_FOCUS_IN_SHELL_TRANSITIONS,
    Flags.FLAG_ENABLE_DISPLAY_FOCUS_IN_SHELL_TRANSITIONS,
)
)
@@ -57,11 +62,12 @@ abstract class MoveToNextDisplayAndFocus() : TestScenarioBase() {
    fun setup() {
    fun setup() {
        connectedDisplayRule.setupTestDisplay()
        connectedDisplayRule.setupTestDisplay()
        testAppInMainDisplay.launchViaIntent(wmHelper)
        testAppInMainDisplay.launchViaIntent(wmHelper)
        testAppInExternalDisplay.launchViaIntent(wmHelper)
    }
    }


    @Test
    @Test
    open fun moveToNextDisplayAndFocus() {
    open fun moveToNextDisplayAndFocus() {
        // TODO(b/434576513): Move launchViaIntent to setup()
        testAppInExternalDisplay.launchViaIntent(wmHelper)
        testAppInExternalDisplay.moveToNextDisplayViaKeyboard(
        testAppInExternalDisplay.moveToNextDisplayViaKeyboard(
            wmHelper,
            wmHelper,
            connectedDisplayRule.addedDisplays.first()
            connectedDisplayRule.addedDisplays.first()