| Index: ui/views/view_unittest.cc
|
| diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
|
| index 38683cc303a93c5be3645c0793ad4adea9bf0993..4027a53f0be9144ca3376c50b4ee38b9c9056cf5 100644
|
| --- a/ui/views/view_unittest.cc
|
| +++ b/ui/views/view_unittest.cc
|
| @@ -353,7 +353,7 @@ TEST_F(ViewTest, MouseEvent) {
|
| v1->Reset();
|
| v2->Reset();
|
|
|
| - gfx::Point p1(110, 120);
|
| + gfx::PointF p1(110.f, 120.f);
|
| ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1, ui::EventTimeForNow(),
|
| ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
|
| root->OnMousePressed(pressed);
|
| @@ -366,7 +366,7 @@ TEST_F(ViewTest, MouseEvent) {
|
| // Drag event out of bounds. Should still go to v2
|
| v1->Reset();
|
| v2->Reset();
|
| - gfx::Point p2(50, 40);
|
| + gfx::PointF p2(50.f, 40.f);
|
| ui::MouseEvent dragged(ui::ET_MOUSE_DRAGGED, p2, p2, ui::EventTimeForNow(),
|
| ui::EF_LEFT_MOUSE_BUTTON, 0);
|
| root->OnMouseDragged(dragged);
|
| @@ -379,7 +379,7 @@ TEST_F(ViewTest, MouseEvent) {
|
| // Releasted event out of bounds. Should still go to v2
|
| v1->Reset();
|
| v2->Reset();
|
| - ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(),
|
| + ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::PointF(), gfx::PointF(),
|
| ui::EventTimeForNow(), 0, 0);
|
| root->OnMouseDragged(released);
|
| EXPECT_EQ(v2->last_mouse_event_type_, ui::ET_MOUSE_RELEASED);
|
| @@ -413,7 +413,7 @@ TEST_F(ViewTest, DeleteOnPressed) {
|
| v1->AddChildView(v2);
|
|
|
| v2->delete_on_pressed_ = true;
|
| - gfx::Point point(110, 120);
|
| + gfx::PointF point(110.f, 120.f);
|
| ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, point, point,
|
| ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON,
|
| ui::EF_LEFT_MOUSE_BUTTON);
|
| @@ -1678,7 +1678,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
|
| v21->Reset();
|
|
|
| // Move the mouse in v111.
|
| - gfx::Point p1(6, 6);
|
| + gfx::PointF p1(6.f, 6.f);
|
| ui::MouseEvent move1(ui::ET_MOUSE_MOVED, p1, p1, ui::EventTimeForNow(), 0, 0);
|
| root_view->OnMouseMoved(move1);
|
| EXPECT_TRUE(v111->received_mouse_enter_);
|
| @@ -1689,7 +1689,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
|
| v1->Reset();
|
|
|
| // Now, move into v121.
|
| - gfx::Point p2(65, 21);
|
| + gfx::PointF p2(65.f, 21.f);
|
| ui::MouseEvent move2(ui::ET_MOUSE_MOVED, p2, p2, ui::EventTimeForNow(), 0, 0);
|
| root_view->OnMouseMoved(move2);
|
| EXPECT_TRUE(v111->received_mouse_exit_);
|
| @@ -1700,7 +1700,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
|
| v121->Reset();
|
|
|
| // Now, move into v11.
|
| - gfx::Point p3(1, 1);
|
| + gfx::PointF p3(1.f, 1.f);
|
| ui::MouseEvent move3(ui::ET_MOUSE_MOVED, p3, p3, ui::EventTimeForNow(), 0, 0);
|
| root_view->OnMouseMoved(move3);
|
| EXPECT_TRUE(v121->received_mouse_exit_);
|
| @@ -1711,7 +1711,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
|
| v11->Reset();
|
|
|
| // Move to v21.
|
| - gfx::Point p4(121, 15);
|
| + gfx::PointF p4(121.f, 15.f);
|
| ui::MouseEvent move4(ui::ET_MOUSE_MOVED, p4, p4, ui::EventTimeForNow(), 0, 0);
|
| root_view->OnMouseMoved(move4);
|
| EXPECT_TRUE(v21->received_mouse_enter_);
|
| @@ -1724,7 +1724,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
|
| v1->Reset();
|
|
|
| // Move to v1.
|
| - gfx::Point p5(21, 0);
|
| + gfx::PointF p5(21.f, 0.f);
|
| ui::MouseEvent move5(ui::ET_MOUSE_MOVED, p5, p5, ui::EventTimeForNow(), 0, 0);
|
| root_view->OnMouseMoved(move5);
|
| EXPECT_TRUE(v21->received_mouse_exit_);
|
| @@ -1734,7 +1734,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
|
| v1->Reset();
|
|
|
| // Now, move into v11.
|
| - gfx::Point p6(15, 15);
|
| + gfx::PointF p6(15.f, 15.f);
|
| ui::MouseEvent mouse6(ui::ET_MOUSE_MOVED, p6, p6, ui::EventTimeForNow(), 0,
|
| 0);
|
| root_view->OnMouseMoved(mouse6);
|
| @@ -1747,7 +1747,7 @@ TEST_F(ViewTest, NotifyEnterExitOnChild) {
|
| // Move back into v1. Although |v1| had already received an ENTER for mouse6,
|
| // and the mouse remains inside |v1| the whole time, it receives another ENTER
|
| // when the mouse leaves v11.
|
| - gfx::Point p7(21, 0);
|
| + gfx::PointF p7(21.f, 0.f);
|
| ui::MouseEvent mouse7(ui::ET_MOUSE_MOVED, p7, p7, ui::EventTimeForNow(), 0,
|
| 0);
|
| root_view->OnMouseMoved(mouse7);
|
| @@ -2277,7 +2277,7 @@ TEST_F(ViewTest, TransformEvent) {
|
| v1->Reset();
|
| v2->Reset();
|
|
|
| - gfx::Point p1(110, 210);
|
| + gfx::PointF p1(110.f, 210.f);
|
| ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, p1, p1, ui::EventTimeForNow(),
|
| ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
|
| root->OnMousePressed(pressed);
|
| @@ -2286,7 +2286,7 @@ TEST_F(ViewTest, TransformEvent) {
|
| EXPECT_EQ(190, v2->location_.x());
|
| EXPECT_EQ(10, v2->location_.y());
|
|
|
| - ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(),
|
| + ui::MouseEvent released(ui::ET_MOUSE_RELEASED, gfx::PointF(), gfx::PointF(),
|
| ui::EventTimeForNow(), 0, 0);
|
| root->OnMouseReleased(released);
|
|
|
| @@ -2302,7 +2302,7 @@ TEST_F(ViewTest, TransformEvent) {
|
| v1->Reset();
|
| v2->Reset();
|
|
|
| - gfx::Point point2(110, 320);
|
| + gfx::PointF point2(110.f, 320.f);
|
| ui::MouseEvent p2(ui::ET_MOUSE_PRESSED, point2, point2, ui::EventTimeForNow(),
|
| ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
|
| root->OnMousePressed(p2);
|
| @@ -2338,7 +2338,7 @@ TEST_F(ViewTest, TransformEvent) {
|
| v2->Reset();
|
| v3->Reset();
|
|
|
| - gfx::Point point(112, 110);
|
| + gfx::PointF point(112.f, 110.f);
|
| ui::MouseEvent p3(ui::ET_MOUSE_PRESSED, point, point, ui::EventTimeForNow(),
|
| ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
|
| root->OnMousePressed(p3);
|
| @@ -2377,7 +2377,7 @@ TEST_F(ViewTest, TransformEvent) {
|
|
|
| // |v3| now occupies (120, 120) to (144, 130) in |root|.
|
|
|
| - gfx::Point point3(124, 125);
|
| + gfx::PointF point3(124.f, 125.f);
|
| ui::MouseEvent p4(ui::ET_MOUSE_PRESSED, point3, point3, ui::EventTimeForNow(),
|
| ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
|
| root->OnMousePressed(p4);
|
|
|