Merge "Update the assertion to get correct navigation mode value." into tm-qpr-dev am: ab56bf206c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18803472 Change-Id: I91cd9a3f526f1cc509f7bf580ba1235b4a141d13 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -21,8 +21,10 @@ import com.android.server.wm.flicker.helpers.WindowUtils
|
||||
import com.android.server.wm.flicker.traces.region.RegionSubject
|
||||
import com.android.server.wm.traces.common.FlickerComponentName
|
||||
|
||||
val LAUNCHER_COMPONENT = FlickerComponentName("com.google.android.apps.nexuslauncher",
|
||||
"com.google.android.apps.nexuslauncher.NexusLauncherActivity")
|
||||
val LAUNCHER_COMPONENT = FlickerComponentName(
|
||||
"com.google.android.apps.nexuslauncher",
|
||||
"com.google.android.apps.nexuslauncher.NexusLauncherActivity"
|
||||
)
|
||||
|
||||
/**
|
||||
* Checks that [FlickerComponentName.STATUS_BAR] window is visible and above the app windows in
|
||||
@@ -110,9 +112,9 @@ fun FlickerTestParameter.statusBarLayerIsVisible() {
|
||||
fun FlickerTestParameter.navBarLayerPositionStart() {
|
||||
assertLayersStart {
|
||||
val display = this.entry.displays.minByOrNull { it.id }
|
||||
?: throw RuntimeException("There is no display!")
|
||||
?: throw RuntimeException("There is no display!")
|
||||
this.visibleRegion(FlickerComponentName.NAV_BAR)
|
||||
.coversExactly(WindowUtils.getNavigationBarPosition(display))
|
||||
.coversExactly(WindowUtils.getNavigationBarPosition(display, isGesturalNavigation))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,9 +125,9 @@ fun FlickerTestParameter.navBarLayerPositionStart() {
|
||||
fun FlickerTestParameter.navBarLayerPositionEnd() {
|
||||
assertLayersEnd {
|
||||
val display = this.entry.displays.minByOrNull { it.id }
|
||||
?: throw RuntimeException("There is no display!")
|
||||
?: throw RuntimeException("There is no display!")
|
||||
this.visibleRegion(FlickerComponentName.NAV_BAR)
|
||||
.coversExactly(WindowUtils.getNavigationBarPosition(display))
|
||||
.coversExactly(WindowUtils.getNavigationBarPosition(display, isGesturalNavigation))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,11 +246,11 @@ fun FlickerTestParameter.replacesLayer(
|
||||
|
||||
assertLayersStart {
|
||||
this.isVisible(originalLayer)
|
||||
.isInvisible(newLayer)
|
||||
.isInvisible(newLayer)
|
||||
}
|
||||
|
||||
assertLayersEnd {
|
||||
this.isInvisible(originalLayer)
|
||||
.isVisible(newLayer)
|
||||
.isVisible(newLayer)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user