Loading tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +12 −3 Original line number Diff line number Diff line Loading @@ -143,17 +143,26 @@ fun FlickerTestParameter.statusBarLayerRotatesScales() { * @param newLayer Layer that should be visible at the end * @param ignoreSnapshot If the snapshot layer should be ignored during the transition * (useful mostly for app launch) * @param ignoreSplashscreen If the splashscreen layer should be ignored during the transition. * If true then we will allow for a splashscreen to be shown before the layer is shown, * otherwise we won't and the layer must appear immediately. */ fun FlickerTestParameter.replacesLayer( originalLayer: FlickerComponentName, newLayer: FlickerComponentName, ignoreSnapshot: Boolean = false ignoreSnapshot: Boolean = false, ignoreSplashscreen: Boolean = true ) { assertLayers { val assertion = this.isVisible(originalLayer) if (ignoreSnapshot) { if (ignoreSnapshot || ignoreSplashscreen) { assertion.then() .isVisible(FlickerComponentName.SNAPSHOT, isOptional = true) } if (ignoreSnapshot) { assertion.isVisible(FlickerComponentName.SNAPSHOT, isOptional = true) } if (ignoreSplashscreen) { assertion.isSplashScreenVisibleFor(newLayer, isOptional = true) } assertion.then().isVisible(newLayer) } Loading tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppTransition.kt +1 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ abstract class OpenAppTransition(protected val testSpec: FlickerTestParameter) { * is replaced by [testApp], which remains visible until the end */ open fun appLayerReplacesLauncher() { testSpec.replacesLayer(LAUNCHER_COMPONENT, testApp.component) testSpec.replacesLayer(LAUNCHER_COMPONENT, testApp.component, ignoreSnapshot = true) } /** Loading Loading
tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +12 −3 Original line number Diff line number Diff line Loading @@ -143,17 +143,26 @@ fun FlickerTestParameter.statusBarLayerRotatesScales() { * @param newLayer Layer that should be visible at the end * @param ignoreSnapshot If the snapshot layer should be ignored during the transition * (useful mostly for app launch) * @param ignoreSplashscreen If the splashscreen layer should be ignored during the transition. * If true then we will allow for a splashscreen to be shown before the layer is shown, * otherwise we won't and the layer must appear immediately. */ fun FlickerTestParameter.replacesLayer( originalLayer: FlickerComponentName, newLayer: FlickerComponentName, ignoreSnapshot: Boolean = false ignoreSnapshot: Boolean = false, ignoreSplashscreen: Boolean = true ) { assertLayers { val assertion = this.isVisible(originalLayer) if (ignoreSnapshot) { if (ignoreSnapshot || ignoreSplashscreen) { assertion.then() .isVisible(FlickerComponentName.SNAPSHOT, isOptional = true) } if (ignoreSnapshot) { assertion.isVisible(FlickerComponentName.SNAPSHOT, isOptional = true) } if (ignoreSplashscreen) { assertion.isSplashScreenVisibleFor(newLayer, isOptional = true) } assertion.then().isVisible(newLayer) } Loading
tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppTransition.kt +1 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ abstract class OpenAppTransition(protected val testSpec: FlickerTestParameter) { * is replaced by [testApp], which remains visible until the end */ open fun appLayerReplacesLauncher() { testSpec.replacesLayer(LAUNCHER_COMPONENT, testApp.component) testSpec.replacesLayer(LAUNCHER_COMPONENT, testApp.component, ignoreSnapshot = true) } /** Loading