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

Commit 2f28af9c authored by Nataniel Borges's avatar Nataniel Borges
Browse files

[DO NOT MERGE] Sync flicker from master to sc-v2

Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 183993924
Change-Id: Icf40d1aa707ffe80e46dcfd2c616355cf48e6719
parent 039e8a7b
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -14,13 +14,14 @@
 * limitations under the License.
 */

@file:JvmName("CommonAssertions")
package com.android.wm.shell.flicker

import android.content.ComponentName
import android.graphics.Region
import android.view.Surface
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.traces.common.FlickerComponentName

fun FlickerTestParameter.appPairsDividerIsVisibleAtEnd() {
    assertLayersEnd {
@@ -72,7 +73,7 @@ fun FlickerTestParameter.dockedStackDividerNotExistsAtEnd() {

fun FlickerTestParameter.appPairsPrimaryBoundsIsVisibleAtEnd(
    rotation: Int,
    primaryComponent: ComponentName
    primaryComponent: FlickerComponentName
) {
    assertLayersEnd {
        val dividerRegion = layer(APP_PAIR_SPLIT_DIVIDER_COMPONENT).visibleRegion.region
@@ -83,7 +84,7 @@ fun FlickerTestParameter.appPairsPrimaryBoundsIsVisibleAtEnd(

fun FlickerTestParameter.dockedStackPrimaryBoundsIsVisibleAtEnd(
    rotation: Int,
    primaryComponent: ComponentName
    primaryComponent: FlickerComponentName
) {
    assertLayersEnd {
        val dividerRegion = layer(DOCKED_STACK_DIVIDER_COMPONENT).visibleRegion.region
@@ -94,7 +95,7 @@ fun FlickerTestParameter.dockedStackPrimaryBoundsIsVisibleAtEnd(

fun FlickerTestParameter.appPairsSecondaryBoundsIsVisibleAtEnd(
    rotation: Int,
    secondaryComponent: ComponentName
    secondaryComponent: FlickerComponentName
) {
    assertLayersEnd {
        val dividerRegion = layer(APP_PAIR_SPLIT_DIVIDER_COMPONENT).visibleRegion.region
@@ -105,7 +106,7 @@ fun FlickerTestParameter.appPairsSecondaryBoundsIsVisibleAtEnd(

fun FlickerTestParameter.dockedStackSecondaryBoundsIsVisibleAtEnd(
    rotation: Int,
    secondaryComponent: ComponentName
    secondaryComponent: FlickerComponentName
) {
    assertLayersEnd {
        val dividerRegion = layer(DOCKED_STACK_DIVIDER_COMPONENT).visibleRegion.region
+3 −3
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@
@file:JvmName("CommonConstants")
package com.android.wm.shell.flicker

import android.content.ComponentName
import com.android.server.wm.traces.common.FlickerComponentName

const val SYSTEM_UI_PACKAGE_NAME = "com.android.systemui"
val APP_PAIR_SPLIT_DIVIDER_COMPONENT = ComponentName("", "AppPairSplitDivider#")
val DOCKED_STACK_DIVIDER_COMPONENT = ComponentName("", "DockedStackDivider#")
 No newline at end of file
val APP_PAIR_SPLIT_DIVIDER_COMPONENT = FlickerComponentName("", "AppPairSplitDivider#")
val DOCKED_STACK_DIVIDER_COMPONENT = FlickerComponentName("", "DockedStackDivider#")
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
 * limitations under the License.
 */

@file:JvmName("WaitUtils")
package com.android.wm.shell.flicker

import android.os.SystemClock
+2 −2
Original line number Diff line number Diff line
@@ -100,8 +100,8 @@ class AppPairsTestCannotPairNonResizeableApps(
            "Non resizeable app not initialized"
        }
        testSpec.assertWmEnd {
            isVisible(nonResizeableApp.component)
            isInvisible(primaryApp.component)
            isAppWindowVisible(nonResizeableApp.component)
            isAppWindowInvisible(primaryApp.component)
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -77,8 +77,8 @@ class AppPairsTestPairPrimaryAndSecondaryApps(
    @Test
    fun bothAppWindowsVisible() {
        testSpec.assertWmEnd {
            isVisible(primaryApp.component)
            isVisible(secondaryApp.component)
            isAppWindowVisible(primaryApp.component)
            isAppWindowVisible(secondaryApp.component)
        }
    }

Loading