LockscreenShadeTransitionController: add more tests for DepthController interactions
Test: LockscreenShadeTransitionControllerTest Bug: 220703613 Change-Id: Ia5a76fe2c788c186e4ee203fffc0eae93364c04d
This commit is contained in:
@@ -250,14 +250,25 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDragDownAmount_depthDistanceIsZero_doesNotSetProgress() {
|
||||
fun testDragDownAmount_depthDistanceIsZero_setsProgressToZero() {
|
||||
context.getOrCreateTestableResources()
|
||||
.addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 0)
|
||||
configurationController.notifyConfigurationChanged()
|
||||
|
||||
transitionController.dragDownAmount = 10f
|
||||
|
||||
verify(depthController, never()).transitionToFullShadeProgress
|
||||
verify(depthController).transitionToFullShadeProgress = 0f
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDragDownAmount_depthDistanceNonZero_setsProgressBasedOnDistance() {
|
||||
context.getOrCreateTestableResources()
|
||||
.addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 100)
|
||||
configurationController.notifyConfigurationChanged()
|
||||
|
||||
transitionController.dragDownAmount = 10f
|
||||
|
||||
verify(depthController).transitionToFullShadeProgress = 0.1f
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user