| 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..75d76bc2cb1fe1d800d4abe6acfd2be19cc662d1 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,9 @@ 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);
|
| + auto screen_center = gfx::PointF(screen_bounds.CenterPoint());
|
| + ui::MouseEvent move_event(ui::ET_MOUSE_MOVED, screen_center, screen_center,
|
| + ui::EventTimeForNow(), 0, 0);
|
| 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,15 +462,14 @@ 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_center, screen_center,
|
| + ui::EventTimeForNow(), 0, 0);
|
| 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);
|
| + auto end_point = gfx::PointF(screen_bounds.CenterPoint());
|
| + end_point.Offset(1.f, 1.f);
|
| ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, end_point, end_point,
|
| ui::EventTimeForNow(), 0, 0);
|
| details = dispatcher->OnEventFromSource(&drag_event);
|
| @@ -544,7 +543,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
|
| widget_view->SetBounds(0, 0, 10, 10);
|
| top_level_widget.GetRootView()->AddChildView(widget_view);
|
|
|
| - gfx::Point cursor_location_main(5, 5);
|
| + gfx::PointF cursor_location_main(5.f, 5.f);
|
| ui::MouseEvent move_main(ui::ET_MOUSE_MOVED, cursor_location_main,
|
| cursor_location_main, ui::EventTimeForNow(),
|
| ui::EF_NONE, ui::EF_NONE);
|
| @@ -570,7 +569,7 @@ TEST_F(WidgetTest, WindowMouseModalityTest) {
|
| modal_dialog_widget->Show();
|
| EXPECT_TRUE(modal_dialog_widget->IsVisible());
|
|
|
| - gfx::Point cursor_location_dialog(100, 100);
|
| + gfx::PointF cursor_location_dialog(100.f, 100.f);
|
| ui::MouseEvent mouse_down_dialog(
|
| ui::ET_MOUSE_PRESSED, cursor_location_dialog, cursor_location_dialog,
|
| ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
|
| @@ -581,7 +580,7 @@ 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);
|
| + gfx::PointF cursor_location_main2(6.f, 6.f);
|
| ui::MouseEvent mouse_down_main(ui::ET_MOUSE_MOVED, cursor_location_main2,
|
| cursor_location_main2, ui::EventTimeForNow(),
|
| ui::EF_NONE, ui::EF_NONE);
|
|
|