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

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

Issue 1951593002: Add MD Ink Drop to host only when a ripple/hover is active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Replaced unique_ptr with scoped_ptr. 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 2d430edcaeb98a023e20de69088e2be5f306bfe6..c75b2c23d7bfb47d119303ddaeaf4f65b0cc12d4 100644
--- a/ui/views/animation/ink_drop_animation_controller_factory_unittest.cc
+++ b/ui/views/animation/ink_drop_animation_controller_factory_unittest.cc
@@ -97,12 +97,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