diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt index 52c8a559b7b35..82b777e016938 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt @@ -255,14 +255,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