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

Unified Diff: ui/app_list/views/apps_grid_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/app_list/views/apps_grid_view_unittest.cc
diff --git a/ui/app_list/views/apps_grid_view_unittest.cc b/ui/app_list/views/apps_grid_view_unittest.cc
index a5f9926bff01cc0328efc28fad781566f869bb16..84c3717a82ee949a565f38734a62cfcd7ec6b24a 100644
--- a/ui/app_list/views/apps_grid_view_unittest.cc
+++ b/ui/app_list/views/apps_grid_view_unittest.cc
@@ -155,12 +155,14 @@ class AppsGridViewTest : public views::ViewsTestBase {
gfx::Point translated_to = gfx::PointAtOffsetFromOrigin(
to - view->bounds().origin());
- ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, translated_from, from,
- ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent pressed_event(
+ ui::ET_MOUSE_PRESSED, translated_from, from, ui::EventTimeForNow(), 0,
+ 0, ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
apps_grid_view_->InitiateDrag(view, pointer, pressed_event);
- ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, translated_to, to,
- ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent drag_event(
+ ui::ET_MOUSE_DRAGGED, translated_to, to, ui::EventTimeForNow(), 0, 0,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
apps_grid_view_->UpdateDragFromItem(pointer, drag_event);
return view;
}
@@ -306,8 +308,10 @@ TEST_F(AppsGridViewTest, MouseDragWithFolderDisabled) {
EXPECT_FALSE(apps_grid_view_->has_dragged_view());
// Even though cancelled, mouse move events can still arrive via the item
// view. Ensure that behaves sanely, and doesn't start a new drag.
- ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, gfx::Point(1, 1),
- gfx::Point(2, 2), ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent drag_event(
+ ui::ET_MOUSE_DRAGGED, gfx::Point(1, 1), gfx::Point(2, 2),
+ ui::EventTimeForNow(), 0, 0,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
apps_grid_view_->UpdateDragFromItem(AppsGridView::MOUSE, drag_event);
EXPECT_FALSE(apps_grid_view_->has_dragged_view());
@@ -451,8 +455,9 @@ TEST_F(AppsGridViewTest, MouseDragMaxItemsInFolderWithMovement) {
to = GetItemTileRectAt(0, 1).CenterPoint();
gfx::Point translated_to =
gfx::PointAtOffsetFromOrigin(to - dragged_view->bounds().origin());
- ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, translated_to, to,
- ui::EventTimeForNow(), 0, 0);
+ ui::MouseEvent drag_event(
+ ui::ET_MOUSE_DRAGGED, translated_to, to, ui::EventTimeForNow(), 0, 0,
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
apps_grid_view_->UpdateDragFromItem(AppsGridView::MOUSE, drag_event);
apps_grid_view_->EndDrag(false);

Powered by Google App Engine
This is Rietveld 408576698