Updating SeamlessAppRotation test

Updating the SeamlessAppRotationTest WM and layer assertions (adding new
ones).

Test: atest FlickerTests:SeamlessAppRotationTest
Bug: b/171049719
Change-Id: I7c6f88088ad1c357f163ffb0126cdc921217ccb3
This commit is contained in:
Antonella Dellanzo
2020-11-05 17:08:31 +00:00
parent cc19e69c3a
commit 4503f978aa
2 changed files with 29 additions and 0 deletions

View File

@@ -79,6 +79,16 @@ fun WmAssertion.wallpaperWindowBecomesVisible(
}
}
fun WmAssertion.windowAlwaysVisible(
packageName: String,
bugId: Int = 0,
enabled: Boolean = bugId == 0
) {
all("windowAlwaysVisible", bugId, enabled) {
this.showsAppWindowOnTop(packageName)
}
}
@JvmOverloads
fun LayersAssertion.noUncoveredRegions(
beginRotation: Int,
@@ -214,6 +224,16 @@ fun LayersAssertion.wallpaperLayerReplacesAppLayer(
}
}
fun LayersAssertion.layerAlwaysVisible(
packageName: String,
bugId: Int = 0,
enabled: Boolean = bugId == 0
) {
all("layerAlwaysVisible", bugId, enabled) {
this.showsLayer(packageName)
}
}
fun EventLogAssertion.focusChanges(
vararg windows: String,
bugId: Int = 0,

View File

@@ -30,6 +30,8 @@ import com.android.server.wm.flicker.FlickerTestRunner
import com.android.server.wm.flicker.FlickerTestRunnerFactory
import com.android.server.wm.flicker.endRotation
import com.android.server.wm.flicker.focusDoesNotChange
import com.android.server.wm.flicker.windowAlwaysVisible
import com.android.server.wm.flicker.layerAlwaysVisible
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.flicker.helpers.buildTestTag
import com.android.server.wm.flicker.helpers.setRotation
@@ -39,6 +41,8 @@ import com.android.server.wm.flicker.navBarLayerIsAlwaysVisible
import com.android.server.wm.flicker.navBarLayerRotatesAndScales
import com.android.server.wm.flicker.navBarWindowIsAlwaysVisible
import com.android.server.wm.flicker.noUncoveredRegions
import com.android.server.wm.flicker.visibleWindowsShownMoreThanOneConsecutiveEntry
import com.android.server.wm.flicker.visibleLayersShownMoreThanOneConsecutiveEntry
import com.android.server.wm.flicker.repetitions
import com.android.server.wm.flicker.startRotation
import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible
@@ -141,6 +145,8 @@ class SeamlessAppRotationTest(
windowManagerTrace {
navBarWindowIsAlwaysVisible(bugId = 140855415)
statusBarWindowIsAlwaysVisible(bugId = 140855415)
visibleWindowsShownMoreThanOneConsecutiveEntry()
windowAlwaysVisible(configuration.intentPackageName)
}
layersTrace {
@@ -152,6 +158,9 @@ class SeamlessAppRotationTest(
configuration.endRotation)
statusBarLayerRotatesScales(configuration.startRotation,
configuration.endRotation, enabled = false)
visibleLayersShownMoreThanOneConsecutiveEntry(
enabled = configuration.startRotation == configuration.endRotation)
layerAlwaysVisible(configuration.intentPackageName)
}
layersTrace {