Merge "Fix test: LockscreenShadeTransitionControllerTest" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
16da0b0898
@@ -87,6 +87,8 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
|
|||||||
row = helper.createRow()
|
row = helper.createRow()
|
||||||
context.getOrCreateTestableResources()
|
context.getOrCreateTestableResources()
|
||||||
.addOverride(R.bool.config_use_split_notification_shade, false)
|
.addOverride(R.bool.config_use_split_notification_shade, false)
|
||||||
|
context.getOrCreateTestableResources()
|
||||||
|
.addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 100)
|
||||||
transitionController = LockscreenShadeTransitionController(
|
transitionController = LockscreenShadeTransitionController(
|
||||||
statusBarStateController = statusbarStateController,
|
statusBarStateController = statusbarStateController,
|
||||||
logger = logger,
|
logger = logger,
|
||||||
@@ -246,6 +248,17 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
|
|||||||
verify(depthController).transitionToFullShadeProgress = anyFloat()
|
verify(depthController).transitionToFullShadeProgress = anyFloat()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testDragDownAmount_depthDistanceIsZero_doesNotSetProgress() {
|
||||||
|
context.getOrCreateTestableResources()
|
||||||
|
.addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 0)
|
||||||
|
configurationController.notifyConfigurationChanged()
|
||||||
|
|
||||||
|
transitionController.dragDownAmount = 10f
|
||||||
|
|
||||||
|
verify(depthController, never()).transitionToFullShadeProgress
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun setDragDownAmount_setsValueOnMediaHierarchyManager() {
|
fun setDragDownAmount_setsValueOnMediaHierarchyManager() {
|
||||||
transitionController.dragDownAmount = 10f
|
transitionController.dragDownAmount = 10f
|
||||||
|
|||||||
Reference in New Issue
Block a user