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

Unified Diff: ui/app_list/views/app_list_main_view_unittest.cc

Issue 2786693002: Add PointerDetails to ui::MouseEvent's constructors (Closed)
Patch Set: mouse event constructor Created 3 years, 9 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/app_list/views/app_list_main_view_unittest.cc
diff --git a/ui/app_list/views/app_list_main_view_unittest.cc b/ui/app_list/views/app_list_main_view_unittest.cc
index e36a14e2f21de541d698f0bcd98ce262ed197e10..cd62dd598cb088b8ad4695e7519ff3446c5f37f5 100644
--- a/ui/app_list/views/app_list_main_view_unittest.cc
+++ b/ui/app_list/views/app_list_main_view_unittest.cc
@@ -133,10 +133,12 @@ class AppListMainViewTest : public views::ViewsTestBase {
gfx::Point center = view->GetLocalBounds().CenterPoint();
view->OnMousePressed(ui::MouseEvent(
ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(),
- ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)));
view->OnMouseReleased(ui::MouseEvent(
ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(),
- ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)));
}
// |point| is in |grid_view|'s coordinates.
@@ -148,8 +150,9 @@ class AppListMainViewTest : public views::ViewsTestBase {
gfx::Point translated =
gfx::PointAtOffsetFromOrigin(point - view->origin());
- ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, translated, point,
- ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent pressed_event(
+ ui::ET_MOUSE_PRESSED, translated, point, ui::EventTimeForNow(), 0, 0,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
grid_view->InitiateDrag(view, pointer, pressed_event);
return view;
}
@@ -162,8 +165,9 @@ class AppListMainViewTest : public views::ViewsTestBase {
DCHECK(drag_view);
gfx::Point translated =
gfx::PointAtOffsetFromOrigin(point - drag_view->origin());
- ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, translated, point,
- ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent drag_event(
+ ui::ET_MOUSE_DRAGGED, translated, point, ui::EventTimeForNow(), 0, 0,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
grid_view->UpdateDragFromItem(pointer, drag_event);
}

Powered by Google App Engine
This is Rietveld 408576698