Some more sync points, api 35 emulator crashing

Change-Id: I90422a13aaba689b035095307446d7d343a59aed
ja/edge-to-edge-dropshots
Jose Alcérreca 6 months ago
parent e26492a0c1
commit 0191ba0b84

@ -153,12 +153,13 @@ class EdgeToEdgeTest {
fun edgeToEdge_Foldable_api35_tallCutout() { fun edgeToEdge_Foldable_api35_tallCutout() {
forceTallCutout() forceTallCutout()
onDevice().setClosedMode() onDevice().setClosedMode()
enableDemoMode() // Mode change resets demo mode!
screenshotSystemBar("edgeToEdge_Foldable_closed_system_tallCutout_api35") screenshotSystemBar("edgeToEdge_Foldable_closed_system_tallCutout_api35")
onDevice().setFlatMode() onDevice().setFlatMode()
enableDemoMode() // Flat mode resets demo mode! enableDemoMode() // Mode change resets demo mode!
screenshotSystemBar("edgeToEdge_Foldable_flat_system_tallCutout_api35") screenshotSystemBar("edgeToEdge_Foldable_flat_system_tallCutout_api35")
forceThreeButtonNavigation()
onDevice().setClosedMode() onDevice().setClosedMode()
resetCutout() resetCutout()
} }
@ -178,6 +179,7 @@ class EdgeToEdgeTest {
} }
private fun runFoldableTests(apiName: String) { private fun runFoldableTests(apiName: String) {
resetCutout()
onDevice().setClosedMode() onDevice().setClosedMode()
screenshotSystemBar("edgeToEdge_Foldable_closed_system_$apiName") screenshotSystemBar("edgeToEdge_Foldable_closed_system_$apiName")
forceThreeButtonNavigation() forceThreeButtonNavigation()
@ -200,7 +202,7 @@ class EdgeToEdgeTest {
// Crop the top, adding extra pixels to check continuity // Crop the top, adding extra pixels to check continuity
val bitmap = takeScreenshot().let { val bitmap = takeScreenshot().let {
val newHeight = 130 val newHeight = 200
Bitmap.createBitmap(it, 0, 0, it.width, newHeight) Bitmap.createBitmap(it, 0, 0, it.width, newHeight)
} }
assertSnapshot(bitmap, screenshotFileName) assertSnapshot(bitmap, screenshotFileName)
@ -234,6 +236,7 @@ class EdgeToEdgeTest {
"com.android.internal.systemui.navbar.threebutton", "com.android.internal.systemui.navbar.threebutton",
) )
} }
waitForWindowUpdate()
} }
private fun forceGestureNavigation() { private fun forceGestureNavigation() {

Loading…
Cancel
Save