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

Unified Diff: ui/views/view_targeter_unittest.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 years, 3 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: ui/views/view_targeter_unittest.cc
diff --git a/ui/views/view_targeter_unittest.cc b/ui/views/view_targeter_unittest.cc
index ad61c17bedb136b45aa5bb36383a7e11c5c97208..992de453999c645ec74c212fa9d88c95f2c77037 100644
--- a/ui/views/view_targeter_unittest.cc
+++ b/ui/views/view_targeter_unittest.cc
@@ -188,13 +188,8 @@ TEST_F(ViewTargeterTest, ViewTargeterForScrollEvents) {
// The event falls within the bounds of |child| and |content| but not
// |grandchild|, so |child| should be the initial target for the event.
- ui::ScrollEvent scroll(ui::ET_SCROLL,
- gfx::Point(60, 60),
- ui::EventTimeForNow(),
- 0,
- 0, 3,
- 0, 3,
- 2);
+ ui::ScrollEvent scroll(ui::ET_SCROLL, gfx::PointF(60.f, 60.f),
+ ui::EventTimeForNow(), 0, 0, 3, 0, 3, 2);
ui::EventTarget* current_target = targeter->FindTargetForEvent(root_view,
&scroll);
EXPECT_EQ(child, static_cast<View*>(current_target));
@@ -213,13 +208,8 @@ TEST_F(ViewTargeterTest, ViewTargeterForScrollEvents) {
// |child|, and |grandchild|. But since |content| is the contents view,
// and contents views are resized to fill the entire area of the root
// view, the event's initial target should still be |content|.
- scroll = ui::ScrollEvent(ui::ET_SCROLL,
- gfx::Point(150, 150),
- ui::EventTimeForNow(),
- 0,
- 0, 3,
- 0, 3,
- 2);
+ scroll = ui::ScrollEvent(ui::ET_SCROLL, gfx::PointF(150.f, 150.f),
+ ui::EventTimeForNow(), 0, 0, 3, 0, 3, 2);
current_target = targeter->FindTargetForEvent(root_view, &scroll);
EXPECT_EQ(content, static_cast<View*>(current_target));
}

Powered by Google App Engine
This is Rietveld 408576698