Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/DesktopModeFlickerScenarios.kt +24 −12 Original line number Diff line number Diff line Loading @@ -298,12 +298,18 @@ class DesktopModeFlickerScenarios { FlickerConfigEntry( scenarioId = ScenarioId("MAXIMIZE_APP"), extractor = TaggedScenarioExtractorBuilder() .setTargetTag(CujType.CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW) .setTransitionMatcher( TaggedCujTransitionMatcher(associatedTransitionRequired = false) ) .build(), ShellTransitionScenarioExtractor( transitionMatcher = object : ITransitionMatcher { override fun findAll( transitions: Collection<Transition> ): Collection<Transition> { return transitions.filter { it.type == TransitionType.DESKTOP_MODE_TOGGLE_RESIZE } } } ), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( AppLayerIncreasesInSize(DESKTOP_MODE_APP), Loading @@ -316,12 +322,18 @@ class DesktopModeFlickerScenarios { FlickerConfigEntry( scenarioId = ScenarioId("MAXIMIZE_APP_NON_RESIZABLE"), extractor = TaggedScenarioExtractorBuilder() .setTargetTag(CujType.CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW) .setTransitionMatcher( TaggedCujTransitionMatcher(associatedTransitionRequired = false) ) .build(), ShellTransitionScenarioExtractor( transitionMatcher = object : ITransitionMatcher { override fun findAll( transitions: Collection<Transition> ): Collection<Transition> { return transitions.filter { it.type == TransitionType.DESKTOP_MODE_TOGGLE_RESIZE } } } ), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( Loading tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt +6 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,11 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) : val displayRect = getDisplayRect(wmHelper) val endX = if (isLeft) displayRect.left else displayRect.right val endX = if (isLeft) { displayRect.left + SNAP_RESIZE_DRAG_INSET } else { displayRect.right - SNAP_RESIZE_DRAG_INSET } val endY = displayRect.centerY() / 2 // drag the window to snap resize Loading Loading @@ -391,6 +395,7 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) : private companion object { val TIMEOUT: Duration = Duration.ofSeconds(3) const val SNAP_RESIZE_DRAG_INSET: Int = 5 // inset to avoid dragging to display edge const val CAPTION: String = "desktop_mode_caption" const val MAXIMIZE_BUTTON_VIEW: String = "maximize_button_view" const val MAXIMIZE_MENU: String = "maximize_menu" Loading Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/DesktopModeFlickerScenarios.kt +24 −12 Original line number Diff line number Diff line Loading @@ -298,12 +298,18 @@ class DesktopModeFlickerScenarios { FlickerConfigEntry( scenarioId = ScenarioId("MAXIMIZE_APP"), extractor = TaggedScenarioExtractorBuilder() .setTargetTag(CujType.CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW) .setTransitionMatcher( TaggedCujTransitionMatcher(associatedTransitionRequired = false) ) .build(), ShellTransitionScenarioExtractor( transitionMatcher = object : ITransitionMatcher { override fun findAll( transitions: Collection<Transition> ): Collection<Transition> { return transitions.filter { it.type == TransitionType.DESKTOP_MODE_TOGGLE_RESIZE } } } ), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( AppLayerIncreasesInSize(DESKTOP_MODE_APP), Loading @@ -316,12 +322,18 @@ class DesktopModeFlickerScenarios { FlickerConfigEntry( scenarioId = ScenarioId("MAXIMIZE_APP_NON_RESIZABLE"), extractor = TaggedScenarioExtractorBuilder() .setTargetTag(CujType.CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW) .setTransitionMatcher( TaggedCujTransitionMatcher(associatedTransitionRequired = false) ) .build(), ShellTransitionScenarioExtractor( transitionMatcher = object : ITransitionMatcher { override fun findAll( transitions: Collection<Transition> ): Collection<Transition> { return transitions.filter { it.type == TransitionType.DESKTOP_MODE_TOGGLE_RESIZE } } } ), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( Loading
tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt +6 −1 Original line number Diff line number Diff line Loading @@ -285,7 +285,11 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) : val displayRect = getDisplayRect(wmHelper) val endX = if (isLeft) displayRect.left else displayRect.right val endX = if (isLeft) { displayRect.left + SNAP_RESIZE_DRAG_INSET } else { displayRect.right - SNAP_RESIZE_DRAG_INSET } val endY = displayRect.centerY() / 2 // drag the window to snap resize Loading Loading @@ -391,6 +395,7 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) : private companion object { val TIMEOUT: Duration = Duration.ofSeconds(3) const val SNAP_RESIZE_DRAG_INSET: Int = 5 // inset to avoid dragging to display edge const val CAPTION: String = "desktop_mode_caption" const val MAXIMIZE_BUTTON_VIEW: String = "maximize_button_view" const val MAXIMIZE_MENU: String = "maximize_menu" Loading