Index: ui/views/animation/ink_drop_host_view_unittest.cc |
diff --git a/ui/views/animation/ink_drop_host_view_unittest.cc b/ui/views/animation/ink_drop_host_view_unittest.cc |
index 367239e74f801aa83d9f1c29180067f85b6813c6..8f626a41c7966cf6c3e7cc69137500044b46dc65 100644 |
--- a/ui/views/animation/ink_drop_host_view_unittest.cc |
+++ b/ui/views/animation/ink_drop_host_view_unittest.cc |
@@ -15,6 +15,9 @@ |
namespace views { |
namespace test { |
+namespace { |
sky
2016/06/30 16:57:48
nit: nuke the namespace here, I don't think it's n
mohsen
2016/07/01 06:06:52
Done.
|
+using InkDropMode = InkDropHostViewTestApi::InkDropMode; |
+} |
class InkDropHostViewTest : public testing::Test { |
public: |
@@ -57,17 +60,21 @@ TEST_F(InkDropHostViewTest, GetInkDropCenterBasedOnLastEventForLocatedEvent) { |
EXPECT_EQ(gfx::Point(5, 6), test_api_.GetInkDropCenterBasedOnLastEvent()); |
} |
-// Verifies that SetHasInkDrop() sets up gesture handling properly. |
-TEST_F(InkDropHostViewTest, SetHasInkDropGestureHandler) { |
+// Verifies that SetInkDropMode() sets up gesture handling properly. |
+TEST_F(InkDropHostViewTest, SetInkDropModeGestureHandler) { |
+ EXPECT_FALSE(test_api_.HasGestureHandler()); |
+ |
+ test_api_.SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER); |
EXPECT_FALSE(test_api_.HasGestureHandler()); |
- test_api_.SetHasInkDrop(true); |
+ test_api_.SetInkDropMode(InkDropMode::ON); |
EXPECT_TRUE(test_api_.HasGestureHandler()); |
- test_api_.SetHasInkDrop(true); |
+ // Enabling gesture handler the second time should just work (no crash). |
+ test_api_.SetInkDropMode(InkDropMode::ON); |
EXPECT_TRUE(test_api_.HasGestureHandler()); |
- test_api_.SetHasInkDrop(false); |
+ test_api_.SetInkDropMode(InkDropMode::OFF); |
EXPECT_FALSE(test_api_.HasGestureHandler()); |
} |