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

Unified Diff: content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 years, 4 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: content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc
diff --git a/content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc b/content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc
index 98145efd01b521e7a08d6a5c5fd41cd6f122607c..e4b0f9d22f73427a2a71e9ddcd7e0eb6b5db5553 100644
--- a/content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc
+++ b/content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc
@@ -386,7 +386,7 @@ TEST_F(SyntheticPointerActionTest, PointerMouseAction) {
EXPECT_EQ(pointer_mouse_target->type(), WebInputEvent::MouseMove);
EXPECT_EQ(pointer_mouse_target->position(), params.position());
EXPECT_EQ(pointer_mouse_target->clickCount(), 0);
- EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::ButtonNone);
+ EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::Button::NoButton);
// Send a mouse down.
action_param_list_.reset(new std::vector<SyntheticPointerActionParams>());
@@ -401,7 +401,7 @@ TEST_F(SyntheticPointerActionTest, PointerMouseAction) {
EXPECT_EQ(pointer_mouse_target->type(), WebInputEvent::MouseDown);
EXPECT_EQ(pointer_mouse_target->position(), params.position());
EXPECT_EQ(pointer_mouse_target->clickCount(), 1);
- EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::ButtonLeft);
+ EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::Button::Left);
// Send a mouse drag.
action_param_list_.reset(new std::vector<SyntheticPointerActionParams>());
@@ -416,7 +416,7 @@ TEST_F(SyntheticPointerActionTest, PointerMouseAction) {
EXPECT_EQ(pointer_mouse_target->type(), WebInputEvent::MouseMove);
EXPECT_EQ(pointer_mouse_target->position(), params.position());
EXPECT_EQ(pointer_mouse_target->clickCount(), 1);
- EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::ButtonLeft);
+ EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::Button::Left);
// Send a mouse up.
action_param_list_.reset(new std::vector<SyntheticPointerActionParams>());
@@ -429,7 +429,7 @@ TEST_F(SyntheticPointerActionTest, PointerMouseAction) {
EXPECT_EQ(0, num_failure_);
EXPECT_EQ(pointer_mouse_target->type(), WebInputEvent::MouseUp);
EXPECT_EQ(pointer_mouse_target->clickCount(), 1);
- EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::ButtonLeft);
+ EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::Button::Left);
}
TEST_F(SyntheticPointerActionTest, PointerMouseActionSourceTypeInvalid) {
@@ -459,7 +459,7 @@ TEST_F(SyntheticPointerActionTest, PointerMouseActionSourceTypeInvalid) {
EXPECT_EQ(pointer_mouse_target->type(), WebInputEvent::MouseDown);
EXPECT_EQ(pointer_mouse_target->position(), params.position());
EXPECT_EQ(pointer_mouse_target->clickCount(), 1);
- EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::ButtonLeft);
+ EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::Button::Left);
}
TEST_F(SyntheticPointerActionTest, PointerMouseActionTypeInvalid) {
@@ -481,7 +481,7 @@ TEST_F(SyntheticPointerActionTest, PointerMouseActionTypeInvalid) {
EXPECT_EQ(pointer_mouse_target->type(), WebInputEvent::MouseMove);
EXPECT_EQ(pointer_mouse_target->position(), params.position());
EXPECT_EQ(pointer_mouse_target->clickCount(), 0);
- EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::ButtonNone);
+ EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::Button::NoButton);
// Cannot send a mouse up without sending a mouse down first.
action_param_list_.reset(new std::vector<SyntheticPointerActionParams>());
@@ -505,7 +505,7 @@ TEST_F(SyntheticPointerActionTest, PointerMouseActionTypeInvalid) {
EXPECT_EQ(pointer_mouse_target->type(), WebInputEvent::MouseDown);
EXPECT_EQ(pointer_mouse_target->position(), params.position());
EXPECT_EQ(pointer_mouse_target->clickCount(), 1);
- EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::ButtonLeft);
+ EXPECT_EQ(pointer_mouse_target->button(), WebMouseEvent::Button::Left);
// Cannot send a mouse down again without releasing the mouse button.
action_param_list_.reset(new std::vector<SyntheticPointerActionParams>());
@@ -520,4 +520,4 @@ TEST_F(SyntheticPointerActionTest, PointerMouseActionTypeInvalid) {
} // namespace
-} // namespace content
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698