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

Unified Diff: ui/message_center/views/notification_view_unittest.cc

Issue 1260453006: ui: events: Add a class to hold common touch and stylus properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address build problems, add accessor and unit tests. Created 5 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: ui/message_center/views/notification_view_unittest.cc
diff --git a/ui/message_center/views/notification_view_unittest.cc b/ui/message_center/views/notification_view_unittest.cc
index 054dfbd97bc7a6c3d351bc25268a5360c166da34..e13b09190c6c390071509666ee2d7a66dcfb5d97 100644
--- a/ui/message_center/views/notification_view_unittest.cc
+++ b/ui/message_center/views/notification_view_unittest.cc
@@ -381,8 +381,10 @@ TEST_F(NotificationViewTest, UpdateButtonsStateTest) {
gfx::Point cursor_location(1, 1);
views::View::ConvertPointToWidget(notification_view()->action_buttons_[0],
&cursor_location);
- ui::MouseEvent move(ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent move(
+ ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
widget()->OnMouseEvent(&move);
EXPECT_EQ(views::CustomButton::STATE_HOVERED,
@@ -396,8 +398,10 @@ TEST_F(NotificationViewTest, UpdateButtonsStateTest) {
// Now construct a mouse move event 1 pixel outside the boundary of the
// widget.
cursor_location = gfx::Point(-1, -1);
- move = ui::MouseEvent(ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ move = ui::MouseEvent(
+ ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
widget()->OnMouseEvent(&move);
EXPECT_EQ(views::CustomButton::STATE_NORMAL,
@@ -419,8 +423,10 @@ TEST_F(NotificationViewTest, UpdateButtonCountTest) {
gfx::Point cursor_location(1, 1);
views::View::ConvertPointToWidget(notification_view()->action_buttons_[0],
&cursor_location);
- ui::MouseEvent move(ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent move(
+ ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
widget()->OnMouseEvent(&move);
EXPECT_EQ(views::CustomButton::STATE_HOVERED,
@@ -438,8 +444,10 @@ TEST_F(NotificationViewTest, UpdateButtonCountTest) {
// Now construct a mouse move event 1 pixel outside the boundary of the
// widget.
cursor_location = gfx::Point(-1, -1);
- move = ui::MouseEvent(ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ move = ui::MouseEvent(
+ ui::ET_MOUSE_MOVED, cursor_location, cursor_location,
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
widget()->OnMouseEvent(&move);
EXPECT_EQ(views::CustomButton::STATE_NORMAL,

Powered by Google App Engine
This is Rietveld 408576698