| Index: ui/events/event_processor_unittest.cc
|
| diff --git a/ui/events/event_processor_unittest.cc b/ui/events/event_processor_unittest.cc
|
| index a0ab5b63f9088412978cd78d284262e34fbd909e..ffdfba529805f8b4b634fa5f64cbecdaac53bb4f 100644
|
| --- a/ui/events/event_processor_unittest.cc
|
| +++ b/ui/events/event_processor_unittest.cc
|
| @@ -64,8 +64,9 @@ TEST_F(EventProcessorTest, Basic) {
|
| SetTarget(child.get());
|
| root()->AddChild(child.Pass());
|
|
|
| - MouseEvent mouse(ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| - EventTimeForNow(), EF_NONE, EF_NONE);
|
| + MouseEvent mouse(ET_MOUSE_MOVED, gfx::PointF(10.f, 10.f),
|
| + gfx::PointF(10.f, 10.f), EventTimeForNow(), EF_NONE,
|
| + EF_NONE);
|
| DispatchEvent(&mouse);
|
| EXPECT_TRUE(root()->child_at(0)->DidReceiveEvent(ET_MOUSE_MOVED));
|
| EXPECT_FALSE(root()->DidReceiveEvent(ET_MOUSE_MOVED));
|
| @@ -144,8 +145,9 @@ TEST_F(EventProcessorTest, NestedEventProcessing) {
|
| // Dispatch a mouse event to the tree of event targets owned by the first
|
| // event processor, checking in ReDispatchEventHandler that the phase and
|
| // target information of the event is correct.
|
| - MouseEvent mouse(ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| - EventTimeForNow(), EF_NONE, EF_NONE);
|
| + MouseEvent mouse(ET_MOUSE_MOVED, gfx::PointF(10.f, 10.f),
|
| + gfx::PointF(10.f, 10.f), EventTimeForNow(), EF_NONE,
|
| + EF_NONE);
|
| DispatchEvent(&mouse);
|
|
|
| // Verify also that |mouse| was seen by the child nodes contained in both
|
| @@ -159,8 +161,9 @@ TEST_F(EventProcessorTest, NestedEventProcessing) {
|
| // Indicate that the child of the second root should handle events, and
|
| // dispatch another mouse event to verify that it is marked as handled.
|
| second_root->child_at(0)->set_mark_events_as_handled(true);
|
| - MouseEvent mouse2(ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| - EventTimeForNow(), EF_NONE, EF_NONE);
|
| + MouseEvent mouse2(ET_MOUSE_MOVED, gfx::PointF(10.f, 10.f),
|
| + gfx::PointF(10.f, 10.f), EventTimeForNow(), EF_NONE,
|
| + EF_NONE);
|
| DispatchEvent(&mouse2);
|
| EXPECT_TRUE(root()->child_at(0)->DidReceiveEvent(ET_MOUSE_MOVED));
|
| EXPECT_TRUE(second_root->child_at(0)->DidReceiveEvent(ET_MOUSE_MOVED));
|
| @@ -177,8 +180,9 @@ TEST_F(EventProcessorTest, OnEventProcessingFinished) {
|
|
|
| // Dispatch a mouse event. We expect the event to be seen by the target,
|
| // handled, and we expect OnEventProcessingFinished() to be invoked once.
|
| - MouseEvent mouse(ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| - EventTimeForNow(), EF_NONE, EF_NONE);
|
| + MouseEvent mouse(ET_MOUSE_MOVED, gfx::PointF(10.f, 10.f),
|
| + gfx::PointF(10.f, 10.f), EventTimeForNow(), EF_NONE,
|
| + EF_NONE);
|
| DispatchEvent(&mouse);
|
| EXPECT_TRUE(root()->child_at(0)->DidReceiveEvent(ET_MOUSE_MOVED));
|
| EXPECT_FALSE(root()->DidReceiveEvent(ET_MOUSE_MOVED));
|
| @@ -199,8 +203,9 @@ TEST_F(EventProcessorTest, OnEventProcessingStarted) {
|
| // OnEventProcessingStarted() should be called once, and
|
| // OnEventProcessingFinished() should be called once. The event should
|
| // remain unhandled.
|
| - MouseEvent mouse(ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| - EventTimeForNow(), EF_NONE, EF_NONE);
|
| + MouseEvent mouse(ET_MOUSE_MOVED, gfx::PointF(10.f, 10.f),
|
| + gfx::PointF(10.f, 10.f), EventTimeForNow(), EF_NONE,
|
| + EF_NONE);
|
| DispatchEvent(&mouse);
|
| EXPECT_TRUE(root()->child_at(0)->DidReceiveEvent(ET_MOUSE_MOVED));
|
| EXPECT_FALSE(root()->DidReceiveEvent(ET_MOUSE_MOVED));
|
| @@ -216,8 +221,9 @@ TEST_F(EventProcessorTest, OnEventProcessingStarted) {
|
| // seen by the target this time, but OnEventProcessingStarted() and
|
| // OnEventProcessingFinished() should both still be called once.
|
| processor()->set_should_processing_occur(false);
|
| - MouseEvent mouse2(ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| - EventTimeForNow(), EF_NONE, EF_NONE);
|
| + MouseEvent mouse2(ET_MOUSE_MOVED, gfx::PointF(10.f, 10.f),
|
| + gfx::PointF(10.f, 10.f), EventTimeForNow(), EF_NONE,
|
| + EF_NONE);
|
| DispatchEvent(&mouse2);
|
| EXPECT_FALSE(root()->child_at(0)->DidReceiveEvent(ET_MOUSE_MOVED));
|
| EXPECT_FALSE(root()->DidReceiveEvent(ET_MOUSE_MOVED));
|
| @@ -357,8 +363,9 @@ TEST_F(EventProcessorTest, HandlerSequence) {
|
| post_grandchild.set_recorder(&recorder);
|
| grandchild_r->AddPostTargetHandler(&post_grandchild);
|
|
|
| - MouseEvent mouse(ET_MOUSE_MOVED, gfx::Point(10, 10), gfx::Point(10, 10),
|
| - EventTimeForNow(), EF_NONE, EF_NONE);
|
| + MouseEvent mouse(ET_MOUSE_MOVED, gfx::PointF(10.f, 10.f),
|
| + gfx::PointF(10.f, 10.f), EventTimeForNow(), EF_NONE,
|
| + EF_NONE);
|
| DispatchEvent(&mouse);
|
|
|
| std::string expected[] = { "PreR", "PreC", "PreG", "G", "PostG", "PostC",
|
|
|