Reduce flicker memory consumption (Pt 3)
Improve flicker memory consumption with the following: - Ensure each assertion has a name for use with parameterized runner Bug: 178572522 Test: atest FickerTests WMShellFlickerTests Change-Id: I84af8ccccbbe42533013be664c91521fe49f7021
This commit is contained in:
@@ -54,7 +54,7 @@ class AppPairsTestCannotPairNonResizeableApps(
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getParams(): List<Array<Any>> {
|
||||
val testTag = "testAppPairs_unpairPrimaryAndSecondaryApps"
|
||||
val testTag = "testAppPairs_cannotPairNonResizeableApps"
|
||||
val testSpec: FlickerBuilder.(Bundle) -> Unit = { configuration ->
|
||||
withTestName {
|
||||
buildTestTag(testTag, configuration)
|
||||
@@ -71,7 +71,7 @@ class AppPairsTestCannotPairNonResizeableApps(
|
||||
appPairsDividerIsInvisible()
|
||||
}
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("onlyResizeableAppWindowVisible") {
|
||||
val nonResizeableApp = nonResizeableApp
|
||||
require(nonResizeableApp != null) {
|
||||
"Non resizeable app not initialized"
|
||||
|
||||
@@ -76,7 +76,7 @@ class AppPairsTestPairPrimaryAndSecondaryApps(
|
||||
}
|
||||
}
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("bothAppWindowsVisible") {
|
||||
isVisible(primaryApp.defaultWindowName)
|
||||
isVisible(secondaryApp.defaultWindowName)
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class AppPairsTestUnpairPrimaryAndSecondaryApps(
|
||||
}
|
||||
}
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("bothAppWindowsInvisible") {
|
||||
isInvisible(primaryApp.defaultWindowName)
|
||||
isInvisible(secondaryApp.defaultWindowName)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class RotateTwoLaunchedAppsInAppPairsMode(
|
||||
val instrumentation = InstrumentationRegistry.getInstrumentation()
|
||||
val testSpec: FlickerBuilder.(Bundle) -> Unit = { configuration ->
|
||||
withTestName {
|
||||
buildTestTag("testRotateAndEnterAppPairsMode", configuration)
|
||||
buildTestTag("testRotateTwoLaunchedAppsInAppPairsMode", configuration)
|
||||
}
|
||||
transitions {
|
||||
executeShellCommand(composePairsCommand(
|
||||
@@ -88,7 +88,7 @@ class RotateTwoLaunchedAppsInAppPairsMode(
|
||||
windowManagerTrace {
|
||||
navBarWindowIsAlwaysVisible()
|
||||
statusBarWindowIsAlwaysVisible()
|
||||
end {
|
||||
end("bothAppWindowsVisible") {
|
||||
isVisible(primaryApp.defaultWindowName)
|
||||
.isVisible(secondaryApp.defaultWindowName)
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class RotateTwoLaunchedAppsRotateAndEnterAppPairsMode(
|
||||
windowManagerTrace {
|
||||
navBarWindowIsAlwaysVisible()
|
||||
statusBarWindowIsAlwaysVisible()
|
||||
end {
|
||||
end("bothAppWindowsVisible") {
|
||||
isVisible(primaryApp.defaultWindowName)
|
||||
isVisible(secondaryApp.defaultWindowName)
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class EnterLegacySplitScreenTest(
|
||||
)
|
||||
}
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("appWindowIsVisible") {
|
||||
isVisible(splitScreenApp.defaultWindowName)
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,7 @@ class EnterLegacySplitScreenTest(
|
||||
)
|
||||
}
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("appWindowIsVisible") {
|
||||
isVisible(splitScreenApp.defaultWindowName)
|
||||
.isVisible(secondaryApp.defaultWindowName)
|
||||
}
|
||||
@@ -185,7 +185,7 @@ class EnterLegacySplitScreenTest(
|
||||
)
|
||||
}
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("appWindowIsVisible") {
|
||||
isInvisible(nonResizeableApp.defaultWindowName)
|
||||
}
|
||||
visibleWindowsShownMoreThanOneConsecutiveEntry(
|
||||
|
||||
@@ -104,7 +104,7 @@ class ExitLegacySplitScreenTest(
|
||||
windowManagerTrace {
|
||||
navBarWindowIsAlwaysVisible()
|
||||
statusBarWindowIsAlwaysVisible()
|
||||
end {
|
||||
end("appWindowIsInvisible") {
|
||||
isInvisible(splitScreenApp.defaultWindowName)
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ class ExitLegacySplitScreenTest(
|
||||
windowManagerTrace {
|
||||
navBarWindowIsAlwaysVisible()
|
||||
statusBarWindowIsAlwaysVisible()
|
||||
end {
|
||||
end("appWindowIsVisible") {
|
||||
isVisible(splitScreenApp.defaultWindowName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class NonResizableDismissInLegacySplitScreenTest(
|
||||
)
|
||||
}
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("nonResizeableAppWindowIsVisible") {
|
||||
isVisible(nonResizeableApp.defaultWindowName)
|
||||
.isInvisible(splitScreenApp.defaultWindowName)
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class NonResizableLaunchInLegacySplitScreenTest(
|
||||
)
|
||||
}
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("nonResizeableAppWindowIsVisible") {
|
||||
isVisible(nonResizeableApp.defaultWindowName)
|
||||
.isInvisible(splitScreenApp.defaultWindowName)
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ class RotateOneLaunchedAppTest(
|
||||
windowManagerTrace {
|
||||
navBarWindowIsAlwaysVisible()
|
||||
statusBarWindowIsAlwaysVisible()
|
||||
end {
|
||||
end("appWindowIsVisible") {
|
||||
isVisible(splitScreenApp.defaultWindowName)
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ class RotateOneLaunchedAppTest(
|
||||
windowManagerTrace {
|
||||
navBarWindowIsAlwaysVisible()
|
||||
statusBarWindowIsAlwaysVisible()
|
||||
end {
|
||||
end("appWindowIsVisible") {
|
||||
isVisible(splitScreenApp.defaultWindowName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class RotateTwoLaunchedAppTest(
|
||||
windowManagerTrace {
|
||||
navBarWindowIsAlwaysVisible()
|
||||
statusBarWindowIsAlwaysVisible()
|
||||
end {
|
||||
end("appWindowIsVisible") {
|
||||
isVisible(splitScreenApp.defaultWindowName)
|
||||
.isVisible(secondaryApp.defaultWindowName)
|
||||
}
|
||||
@@ -141,7 +141,7 @@ class RotateTwoLaunchedAppTest(
|
||||
windowManagerTrace {
|
||||
navBarWindowIsAlwaysVisible()
|
||||
statusBarWindowIsAlwaysVisible()
|
||||
end {
|
||||
end("appWindowIsVisible") {
|
||||
isVisible(splitScreenApp.defaultWindowName)
|
||||
.isVisible(secondaryApp.defaultWindowName)
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ class PipKeyboardTest(
|
||||
}
|
||||
assertions {
|
||||
windowManagerTrace {
|
||||
end {
|
||||
end("imeWindowAboveApp") {
|
||||
isAboveWindow(IME_WINDOW_NAME, testApp.defaultWindowName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user