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

Unified Diff: ash/shelf/shelf_widget_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: ash/shelf/shelf_widget_unittest.cc
diff --git a/ash/shelf/shelf_widget_unittest.cc b/ash/shelf/shelf_widget_unittest.cc
index c38e786897b029fa0303a575cb5674bfbaef12e7..3f8f0c883fc3f121b30d873e6624a78dc7deece0 100644
--- a/ash/shelf/shelf_widget_unittest.cc
+++ b/ash/shelf/shelf_widget_unittest.cc
@@ -222,8 +222,10 @@ TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
// window-targeter should find |widget| as the target (instead of the
// shelf).
gfx::Point event_location(widget_bounds.x() + 5, shelf_bounds.y() + 1);
- ui::MouseEvent mouse(ui::ET_MOUSE_MOVED, event_location, event_location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent mouse(
+ ui::ET_MOUSE_MOVED, event_location, event_location,
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
ui::EventTarget* target = targeter->FindTargetForEvent(root, &mouse);
EXPECT_EQ(widget->GetNativeWindow(), target);
}
@@ -238,8 +240,10 @@ TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
// window-targeter should find |widget| as the target (instead of the
// shelf).
gfx::Point event_location(shelf_bounds.right() - 1, widget_bounds.y() + 5);
- ui::MouseEvent mouse(ui::ET_MOUSE_MOVED, event_location, event_location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent mouse(
+ ui::ET_MOUSE_MOVED, event_location, event_location,
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
ui::EventTarget* target = targeter->FindTargetForEvent(root, &mouse);
EXPECT_EQ(widget->GetNativeWindow(), target);
}
@@ -263,8 +267,10 @@ TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
// Create a mouse-event targeting the top of the shelf widget. This time,
// window-target should find the shelf as the target.
gfx::Point event_location(widget_bounds.x() + 5, shelf_bounds.y() + 1);
- ui::MouseEvent mouse(ui::ET_MOUSE_MOVED, event_location, event_location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent mouse(
+ ui::ET_MOUSE_MOVED, event_location, event_location,
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE,
+ ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
ui::EventTarget* target = targeter->FindTargetForEvent(root, &mouse);
EXPECT_EQ(shelf_widget->GetNativeWindow(), target);
}

Powered by Google App Engine
This is Rietveld 408576698