Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ test_module_config { "com.android.wm.shell.flicker.bubbles.EnterBubbleFromHomeScreenTrampolineTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleViaBubbleMenuTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTrampolineTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleViaOverflowMenuTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleWithImeViaBubbleMenuTest", "com.android.wm.shell.flicker.bubbles.ExpandBubbleViaBubbleStackTest", Loading Loading @@ -179,6 +180,13 @@ test_module_config { include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTest"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTrampolineTest", base: "WMShellExplicitFlickerTestsBubbles", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTrampolineTest"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaOverflowMenuTest", base: "WMShellExplicitFlickerTestsBubbles", Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/TEST_MAPPING +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTest", "keywords": ["device"] }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTrampolineTest", "keywords": ["device"] }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaOverflowMenuTest", "keywords": ["device"] Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/BubbleFlickerTrampolineTestBase.kt +9 −3 Original line number Diff line number Diff line Loading @@ -26,17 +26,23 @@ import com.android.server.wm.flicker.testapp.ActivityOptions */ abstract class BubbleFlickerTrampolineTestBase : BubbleFlickerTestBase() { override val testApp = trampolineFinishApp override val testApp = runningApp companion object { val trampolineStartingApp: StandardAppHelper = /** * Entry point for the app that is launching via trampoline */ val trampolineApp: StandardAppHelper = SimpleAppHelper( instrumentation, launcherName = ActivityOptions.TrampolineStartActivity.LABEL, component = ActivityOptions.TrampolineStartActivity.COMPONENT.toFlickerComponent(), ) val trampolineFinishApp: StandardAppHelper = /** * App that will actually be running after the trampoline finishes */ val runningApp: StandardAppHelper = SimpleAppHelper( instrumentation, launcherName = ActivityOptions.TrampolineFinishActivity.LABEL, Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleFromHomeScreenTrampolineTest.kt +7 −11 Original line number Diff line number Diff line Loading @@ -36,7 +36,9 @@ import org.junit.runners.MethodSorters * clicking bubble menu from the home screen. * * To run this test: * `atest WMShellExplicitFlickerTestsBubbles:EnterBubbleFromHomeScreenTrampolineTest` * ``` * atest WMShellExplicitFlickerTestsBubbles:EnterBubbleFromHomeScreenTrampolineTest * ``` * * Actions: * ``` Loading @@ -45,7 +47,7 @@ import org.junit.runners.MethodSorters * ``` * * Verified tests: * - [BubbleFlickerTestBase] * - [BubbleFlickerTrampolineTestBase] * - [EnterBubbleTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) Loading @@ -59,19 +61,13 @@ open class EnterBubbleFromHomeScreenTrampolineTest : private val recordTraceWithTransitionRule = RecordTraceWithTransitionRule( transition = { launchBubbleViaBubbleMenu( trampolineStartingApp, tapl, wmHelper, FROM_HOME_SCREEN, ) launchBubbleViaBubbleMenu(trampolineApp, tapl, wmHelper, FROM_HOME_SCREEN) }, tearDownAfterTransition = { trampolineFinishApp.exit(wmHelper) runningApp.exit(wmHelper) // Clean up the app icon that might have been added to the home screen during // the test transition. val testAppIcon = tapl.workspace.getWorkspaceAppIcon(trampolineStartingApp.appName) val testAppIcon = tapl.workspace.getWorkspaceAppIcon(trampolineApp.appName) tapl.workspace.deleteAppIcon(testAppIcon) }, ) Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleViaDragToBubbleBarTest.kt +3 −19 Original line number Diff line number Diff line Loading @@ -19,12 +19,10 @@ package com.android.wm.shell.flicker.bubbles import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import android.tools.traces.component.ComponentNameMatcher.Companion.LAUNCHER import android.tools.traces.component.ComponentNameMatcher.Companion.TASK_BAR import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleTestCases import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleViaDragToBubbleBarTestCases import com.android.wm.shell.flicker.bubbles.utils.ApplyPerParameterRule import com.android.wm.shell.flicker.bubbles.utils.BubbleFlickerTestHelper.launchBubbleViaDragToBubbleBar import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule Loading @@ -33,7 +31,6 @@ import org.junit.Assume.assumeTrue import org.junit.Before import org.junit.FixMethodOrder import org.junit.Rule import org.junit.Test import org.junit.rules.TestRule import org.junit.runner.RunWith import org.junit.runners.MethodSorters Loading @@ -55,7 +52,7 @@ import org.junit.runners.Parameterized * ``` * Verified tests: * - [BubbleFlickerTestBase] * - [EnterBubbleTestCases] * - [EnterBubbleViaDragToBubbleBarTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE, Flags.FLAG_ENABLE_BUBBLE_BAR) @RequiresDevice Loading @@ -63,7 +60,7 @@ import org.junit.runners.Parameterized @Presubmit @RunWith(Parameterized::class) class EnterBubbleViaDragToBubbleBarTest(navBar: NavBar) : BubbleFlickerTestBase(), EnterBubbleTestCases { EnterBubbleViaDragToBubbleBarTestCases { companion object { private val recordTraceWithTransitionRule = RecordTraceWithTransitionRule( Loading Loading @@ -94,17 +91,4 @@ class EnterBubbleViaDragToBubbleBarTest(navBar: NavBar) : BubbleFlickerTestBase( assumeTrue(tapl.isTablet) super.setUp() } @Test override fun focusChanges() { eventLogSubject.focusChanges( LAUNCHER.toWindowName(), // Tap on the task bar. TASK_BAR.toWindowName(), // Drag an icon from task bar to the bubble bar location. LAUNCHER.toWindowName(), // The bubble app launches. testApp.toWindowName() ) } } No newline at end of file Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ test_module_config { "com.android.wm.shell.flicker.bubbles.EnterBubbleFromHomeScreenTrampolineTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleViaBubbleMenuTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTrampolineTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleViaOverflowMenuTest", "com.android.wm.shell.flicker.bubbles.EnterBubbleWithImeViaBubbleMenuTest", "com.android.wm.shell.flicker.bubbles.ExpandBubbleViaBubbleStackTest", Loading Loading @@ -179,6 +180,13 @@ test_module_config { include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTest"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTrampolineTest", base: "WMShellExplicitFlickerTestsBubbles", test_suites: ["device-tests"], include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTrampolineTest"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaOverflowMenuTest", base: "WMShellExplicitFlickerTestsBubbles", Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/TEST_MAPPING +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTest", "keywords": ["device"] }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTrampolineTest", "keywords": ["device"] }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaOverflowMenuTest", "keywords": ["device"] Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/BubbleFlickerTrampolineTestBase.kt +9 −3 Original line number Diff line number Diff line Loading @@ -26,17 +26,23 @@ import com.android.server.wm.flicker.testapp.ActivityOptions */ abstract class BubbleFlickerTrampolineTestBase : BubbleFlickerTestBase() { override val testApp = trampolineFinishApp override val testApp = runningApp companion object { val trampolineStartingApp: StandardAppHelper = /** * Entry point for the app that is launching via trampoline */ val trampolineApp: StandardAppHelper = SimpleAppHelper( instrumentation, launcherName = ActivityOptions.TrampolineStartActivity.LABEL, component = ActivityOptions.TrampolineStartActivity.COMPONENT.toFlickerComponent(), ) val trampolineFinishApp: StandardAppHelper = /** * App that will actually be running after the trampoline finishes */ val runningApp: StandardAppHelper = SimpleAppHelper( instrumentation, launcherName = ActivityOptions.TrampolineFinishActivity.LABEL, Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleFromHomeScreenTrampolineTest.kt +7 −11 Original line number Diff line number Diff line Loading @@ -36,7 +36,9 @@ import org.junit.runners.MethodSorters * clicking bubble menu from the home screen. * * To run this test: * `atest WMShellExplicitFlickerTestsBubbles:EnterBubbleFromHomeScreenTrampolineTest` * ``` * atest WMShellExplicitFlickerTestsBubbles:EnterBubbleFromHomeScreenTrampolineTest * ``` * * Actions: * ``` Loading @@ -45,7 +47,7 @@ import org.junit.runners.MethodSorters * ``` * * Verified tests: * - [BubbleFlickerTestBase] * - [BubbleFlickerTrampolineTestBase] * - [EnterBubbleTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) Loading @@ -59,19 +61,13 @@ open class EnterBubbleFromHomeScreenTrampolineTest : private val recordTraceWithTransitionRule = RecordTraceWithTransitionRule( transition = { launchBubbleViaBubbleMenu( trampolineStartingApp, tapl, wmHelper, FROM_HOME_SCREEN, ) launchBubbleViaBubbleMenu(trampolineApp, tapl, wmHelper, FROM_HOME_SCREEN) }, tearDownAfterTransition = { trampolineFinishApp.exit(wmHelper) runningApp.exit(wmHelper) // Clean up the app icon that might have been added to the home screen during // the test transition. val testAppIcon = tapl.workspace.getWorkspaceAppIcon(trampolineStartingApp.appName) val testAppIcon = tapl.workspace.getWorkspaceAppIcon(trampolineApp.appName) tapl.workspace.deleteAppIcon(testAppIcon) }, ) Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleViaDragToBubbleBarTest.kt +3 −19 Original line number Diff line number Diff line Loading @@ -19,12 +19,10 @@ package com.android.wm.shell.flicker.bubbles import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import android.tools.traces.component.ComponentNameMatcher.Companion.LAUNCHER import android.tools.traces.component.ComponentNameMatcher.Companion.TASK_BAR import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleTestCases import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleViaDragToBubbleBarTestCases import com.android.wm.shell.flicker.bubbles.utils.ApplyPerParameterRule import com.android.wm.shell.flicker.bubbles.utils.BubbleFlickerTestHelper.launchBubbleViaDragToBubbleBar import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule Loading @@ -33,7 +31,6 @@ import org.junit.Assume.assumeTrue import org.junit.Before import org.junit.FixMethodOrder import org.junit.Rule import org.junit.Test import org.junit.rules.TestRule import org.junit.runner.RunWith import org.junit.runners.MethodSorters Loading @@ -55,7 +52,7 @@ import org.junit.runners.Parameterized * ``` * Verified tests: * - [BubbleFlickerTestBase] * - [EnterBubbleTestCases] * - [EnterBubbleViaDragToBubbleBarTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE, Flags.FLAG_ENABLE_BUBBLE_BAR) @RequiresDevice Loading @@ -63,7 +60,7 @@ import org.junit.runners.Parameterized @Presubmit @RunWith(Parameterized::class) class EnterBubbleViaDragToBubbleBarTest(navBar: NavBar) : BubbleFlickerTestBase(), EnterBubbleTestCases { EnterBubbleViaDragToBubbleBarTestCases { companion object { private val recordTraceWithTransitionRule = RecordTraceWithTransitionRule( Loading Loading @@ -94,17 +91,4 @@ class EnterBubbleViaDragToBubbleBarTest(navBar: NavBar) : BubbleFlickerTestBase( assumeTrue(tapl.isTablet) super.setUp() } @Test override fun focusChanges() { eventLogSubject.focusChanges( LAUNCHER.toWindowName(), // Tap on the task bar. TASK_BAR.toWindowName(), // Drag an icon from task bar to the bubble bar location. LAUNCHER.toWindowName(), // The bubble app launches. testApp.toWindowName() ) } } No newline at end of file