Merge "LockscreenShadeTransitionController: add more tests for DepthController interactions" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
36ad1aee13
@@ -255,14 +255,25 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testDragDownAmount_depthDistanceIsZero_doesNotSetProgress() {
|
fun testDragDownAmount_depthDistanceIsZero_setsProgressToZero() {
|
||||||
context.getOrCreateTestableResources()
|
context.getOrCreateTestableResources()
|
||||||
.addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 0)
|
.addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 0)
|
||||||
configurationController.notifyConfigurationChanged()
|
configurationController.notifyConfigurationChanged()
|
||||||
|
|
||||||
transitionController.dragDownAmount = 10f
|
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
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user