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

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

Issue 1390113006: Added material design mouse hover feedback support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 8f15a8286f68ad0e88d3deac7a4245d06beb0e18..b424467f210c9af99bba4a5c209a2079f5b4c868 100644
--- a/ui/views/animation/ink_drop_animation_controller_factory_unittest.cc
+++ b/ui/views/animation/ink_drop_animation_controller_factory_unittest.cc
@@ -79,13 +79,32 @@ void MDInkDropAnimationControllerFactoryTest::SetUp() {
InkDropAnimationControllerFactoryTest::SetUp();
}
-TEST_ALL_INK_DROPS(StateIsHiddenInitially,
+TEST_ALL_INK_DROPS(InitialState,
{
+ EXPECT_FALSE(ink_drop_animation_controller_->IsHovered());
EXPECT_EQ(
InkDropState::HIDDEN,
ink_drop_animation_controller_->GetInkDropState());
})
+TEST_ALL_INK_DROPS(SetHovered,
+ {
+ ink_drop_animation_controller_->SetHovered(true);
+ EXPECT_TRUE(ink_drop_animation_controller_->IsHovered());
+
+ ink_drop_animation_controller_->SetHovered(false);
+ EXPECT_FALSE(ink_drop_animation_controller_->IsHovered());
+ })
+
+TEST_ALL_INK_DROPS(HoveredStateAfterAnimateToState,
+ {
+ ink_drop_animation_controller_->SetHovered(true);
+ ink_drop_animation_controller_->AnimateToState(
+ InkDropState::QUICK_ACTION);
+
+ EXPECT_TRUE(ink_drop_animation_controller_->IsHovered());
+ })
+
TEST_ALL_INK_DROPS(TypicalQuickAction,
{
ink_drop_animation_controller_->AnimateToState(

Powered by Google App Engine
This is Rietveld 408576698