From 354672709a0d072e73f96188ba2a6635356d3144 Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Thu, 30 Mar 2023 13:11:23 +0000 Subject: [PATCH] Update for compatibility with region subject Bug: 237278810 Test: atest FlickerTests WMShellFlickerTests Merged-In: I6b231ad50e8b8d7499ad6163033b0ab4ffaf4868 Change-Id: I8813bab58c9d117cd6dc5ece38997907e14eeae0 --- .../src/com/android/wm/shell/flicker/CommonAssertions.kt | 2 +- .../src/com/android/server/wm/flicker/CommonAssertions.kt | 2 +- .../server/wm/flicker/ime/CloseImeOnDismissPopupDialogTest.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt index e986ee1277080..c416ad011c4eb 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt @@ -137,7 +137,7 @@ fun FlickerTest.splitAppLayerBoundsBecomesVisible( portraitPosTop: Boolean ) { assertLayers { - this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) + this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component), isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt index 314b9e4a853b7..f389e13a68841 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt @@ -260,7 +260,7 @@ fun FlickerTest.snapshotStartingWindowLayerCoversExactlyOnApp(component: ICompon snapshotLayers .mapNotNull { snapshotLayer -> snapshotLayer.layer.visibleRegion } .toTypedArray() - val snapshotRegion = RegionSubject(visibleAreas, this, timestamp) + val snapshotRegion = RegionSubject(visibleAreas, timestamp) val appVisibleRegion = it.visibleRegion(component) if (snapshotRegion.region.isNotEmpty) { snapshotRegion.coversExactly(appVisibleRegion.region) diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeOnDismissPopupDialogTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeOnDismissPopupDialogTest.kt index 6066d2e742098..34fa921f5777f 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeOnDismissPopupDialogTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeOnDismissPopupDialogTest.kt @@ -88,7 +88,7 @@ open class CloseImeOnDismissPopupDialogTest(flicker: FlickerTest) : BaseTest(fli imeSnapshotLayers .mapNotNull { imeSnapshotLayer -> imeSnapshotLayer.layer.visibleRegion } .toTypedArray() - val imeVisibleRegion = RegionSubject(visibleAreas, this, timestamp) + val imeVisibleRegion = RegionSubject(visibleAreas, timestamp) val appVisibleRegion = it.visibleRegion(imeTestApp) if (imeVisibleRegion.region.isNotEmpty) { imeVisibleRegion.coversAtMost(appVisibleRegion.region)