Index: ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc |
index b2d301d018fa10517f237b79cc941248451eede1..d914b1bc42168cba3457f822e8ec60e5b4118881 100644 |
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc |
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc |
@@ -451,9 +451,10 @@ TEST_F(DesktopAuraWidgetTest, TopLevelOwnedPopupRepositionTest) { |
// and release stopping at |last_event_type|. |
void GenerateMouseEvents(Widget* widget, ui::EventType last_event_type) { |
const gfx::Rect screen_bounds(widget->GetWindowBoundsInScreen()); |
- ui::MouseEvent move_event(ui::ET_MOUSE_MOVED, screen_bounds.CenterPoint(), |
- screen_bounds.CenterPoint(), ui::EventTimeForNow(), |
- 0, 0); |
+ ui::MouseEvent move_event( |
+ ui::ET_MOUSE_MOVED, screen_bounds.CenterPoint(), |
+ screen_bounds.CenterPoint(), ui::EventTimeForNow(), 0, 0, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
ui::EventProcessor* dispatcher = WidgetTest::GetEventProcessor(widget); |
ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move_event); |
if (last_event_type == ui::ET_MOUSE_ENTERED || details.dispatcher_destroyed) |
@@ -462,23 +463,26 @@ void GenerateMouseEvents(Widget* widget, ui::EventType last_event_type) { |
if (last_event_type == ui::ET_MOUSE_MOVED || details.dispatcher_destroyed) |
return; |
- ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED, screen_bounds.CenterPoint(), |
- screen_bounds.CenterPoint(), ui::EventTimeForNow(), |
- 0, 0); |
+ ui::MouseEvent press_event( |
+ ui::ET_MOUSE_PRESSED, screen_bounds.CenterPoint(), |
+ screen_bounds.CenterPoint(), ui::EventTimeForNow(), 0, 0, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
details = dispatcher->OnEventFromSource(&press_event); |
if (last_event_type == ui::ET_MOUSE_PRESSED || details.dispatcher_destroyed) |
return; |
gfx::Point end_point(screen_bounds.CenterPoint()); |
end_point.Offset(1, 1); |
- ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, end_point, end_point, |
- ui::EventTimeForNow(), 0, 0); |
+ ui::MouseEvent drag_event( |
+ ui::ET_MOUSE_DRAGGED, end_point, end_point, ui::EventTimeForNow(), 0, 0, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
details = dispatcher->OnEventFromSource(&drag_event); |
if (last_event_type == ui::ET_MOUSE_DRAGGED || details.dispatcher_destroyed) |
return; |
- ui::MouseEvent release_event(ui::ET_MOUSE_RELEASED, end_point, end_point, |
- ui::EventTimeForNow(), 0, 0); |
+ ui::MouseEvent release_event( |
+ ui::ET_MOUSE_RELEASED, end_point, end_point, ui::EventTimeForNow(), 0, 0, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
details = dispatcher->OnEventFromSource(&release_event); |
if (details.dispatcher_destroyed) |
return; |
@@ -545,9 +549,10 @@ TEST_F(WidgetTest, WindowMouseModalityTest) { |
top_level_widget.GetRootView()->AddChildView(widget_view); |
gfx::Point cursor_location_main(5, 5); |
- ui::MouseEvent move_main(ui::ET_MOUSE_MOVED, cursor_location_main, |
- cursor_location_main, ui::EventTimeForNow(), |
- ui::EF_NONE, ui::EF_NONE); |
+ ui::MouseEvent move_main( |
+ ui::ET_MOUSE_MOVED, cursor_location_main, cursor_location_main, |
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
ui::EventDispatchDetails details = |
GetEventProcessor(&top_level_widget)->OnEventFromSource(&move_main); |
ASSERT_FALSE(details.dispatcher_destroyed); |
@@ -573,7 +578,8 @@ TEST_F(WidgetTest, WindowMouseModalityTest) { |
gfx::Point cursor_location_dialog(100, 100); |
ui::MouseEvent mouse_down_dialog( |
ui::ET_MOUSE_PRESSED, cursor_location_dialog, cursor_location_dialog, |
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE); |
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
details = GetEventProcessor(&top_level_widget)->OnEventFromSource( |
&mouse_down_dialog); |
ASSERT_FALSE(details.dispatcher_destroyed); |
@@ -582,9 +588,10 @@ TEST_F(WidgetTest, WindowMouseModalityTest) { |
// Send a mouse move message to the main window. It should not be received by |
// the main window as the modal dialog is still active. |
gfx::Point cursor_location_main2(6, 6); |
- ui::MouseEvent mouse_down_main(ui::ET_MOUSE_MOVED, cursor_location_main2, |
- cursor_location_main2, ui::EventTimeForNow(), |
- ui::EF_NONE, ui::EF_NONE); |
+ ui::MouseEvent mouse_down_main( |
+ ui::ET_MOUSE_MOVED, cursor_location_main2, cursor_location_main2, |
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE, |
+ ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
details = GetEventProcessor(&top_level_widget)->OnEventFromSource( |
&mouse_down_main); |
ASSERT_FALSE(details.dispatcher_destroyed); |