Loading tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +8 −10 Original line number Diff line number Diff line Loading @@ -255,24 +255,22 @@ fun LegacyFlickerTest.snapshotStartingWindowLayerCoversExactlyOnApp( invoke("snapshotStartingWindowLayerCoversExactlyOnApp") { val snapshotLayers = it.subjects.filter { subject -> subject.name.contains(ComponentNameMatcher.SNAPSHOT.toLayerName()) && ComponentNameMatcher.SNAPSHOT.layerMatchesAnyOf(subject.layer) && subject.isVisible } // Verify the size of snapshotRegion covers appVisibleRegion exactly in animation. if (snapshotLayers.isNotEmpty()) { val visibleAreas = snapshotLayers .mapNotNull { snapshotLayer -> snapshotLayer.layer.visibleRegion } .toTypedArray() val snapshotRegion = RegionSubject(visibleAreas, timestamp) val appVisibleRegion = it.visibleRegion(component) // Verify the size of snapshotRegion covers appVisibleRegion exactly in animation. if (snapshotRegion.region.isNotEmpty) { val appVisibleRegion = it.visibleRegion(component) snapshotRegion.coversExactly(appVisibleRegion.region) } } } } } /** * Asserts that: Loading Loading
tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +8 −10 Original line number Diff line number Diff line Loading @@ -255,24 +255,22 @@ fun LegacyFlickerTest.snapshotStartingWindowLayerCoversExactlyOnApp( invoke("snapshotStartingWindowLayerCoversExactlyOnApp") { val snapshotLayers = it.subjects.filter { subject -> subject.name.contains(ComponentNameMatcher.SNAPSHOT.toLayerName()) && ComponentNameMatcher.SNAPSHOT.layerMatchesAnyOf(subject.layer) && subject.isVisible } // Verify the size of snapshotRegion covers appVisibleRegion exactly in animation. if (snapshotLayers.isNotEmpty()) { val visibleAreas = snapshotLayers .mapNotNull { snapshotLayer -> snapshotLayer.layer.visibleRegion } .toTypedArray() val snapshotRegion = RegionSubject(visibleAreas, timestamp) val appVisibleRegion = it.visibleRegion(component) // Verify the size of snapshotRegion covers appVisibleRegion exactly in animation. if (snapshotRegion.region.isNotEmpty) { val appVisibleRegion = it.visibleRegion(component) snapshotRegion.coversExactly(appVisibleRegion.region) } } } } } /** * Asserts that: Loading