Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1057)

Unified Diff: ui/views/animation/ink_drop_animation_controller_factory_unittest.cc

Issue 1897073002: Add MD Ink Drop Layers to InkDropHost only when a ripple/hover is active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed InkDropHoverTests to use proper expectation comparisons. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/animation/ink_drop_animation_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_animation_controller_factory_unittest.cc
diff --git a/ui/views/animation/ink_drop_animation_controller_factory_unittest.cc b/ui/views/animation/ink_drop_animation_controller_factory_unittest.cc
index 64df5fee3b10eb98db2d2dbd0c0627229f20e7d9..d611c6441ed5882f1e42a3989024559932227492 100644
--- a/ui/views/animation/ink_drop_animation_controller_factory_unittest.cc
+++ b/ui/views/animation/ink_drop_animation_controller_factory_unittest.cc
@@ -102,12 +102,20 @@ INSTANTIATE_TEST_CASE_P(
ui::MaterialDesignController::MATERIAL_HYBRID));
TEST_P(InkDropAnimationControllerFactoryTest,
- VerifyAllInkDropLayersRemovedAfterDestruction) {
+ VerifyInkDropLayersRemovedAfterDestructionWhenRippleIsActive) {
ink_drop_animation_controller_->AnimateToState(InkDropState::ACTION_PENDING);
ink_drop_animation_controller_.reset();
EXPECT_EQ(0, test_ink_drop_host_.num_ink_drop_layers());
}
+TEST_P(InkDropAnimationControllerFactoryTest,
+ VerifyInkDropLayersRemovedAfterDestructionWhenHoverIsActive) {
+ test_ink_drop_host_.set_should_show_hover(true);
+ ink_drop_animation_controller_->SetHovered(true);
+ ink_drop_animation_controller_.reset();
+ EXPECT_EQ(0, test_ink_drop_host_.num_ink_drop_layers());
+}
+
TEST_P(InkDropAnimationControllerFactoryTest, StateIsHiddenInitially) {
EXPECT_EQ(InkDropState::HIDDEN,
ink_drop_animation_controller_->GetTargetInkDropState());
« no previous file with comments | « no previous file | ui/views/animation/ink_drop_animation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698