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

Unified Diff: ash/drag_drop/drag_drop_tracker_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: ash/drag_drop/drag_drop_tracker_unittest.cc
diff --git a/ash/drag_drop/drag_drop_tracker_unittest.cc b/ash/drag_drop/drag_drop_tracker_unittest.cc
index 0e4bfa1ec421990d71f94fd3aa71ca0d1133c4f5..d3cd80ccd4f597a2be33f4412db666c24897f01c 100644
--- a/ash/drag_drop/drag_drop_tracker_unittest.cc
+++ b/ash/drag_drop/drag_drop_tracker_unittest.cc
@@ -31,8 +31,9 @@ class DragDropTrackerTest : public test::AshTestBase {
static aura::Window* GetTarget(const gfx::Point& location) {
scoped_ptr<DragDropTracker> tracker(
new DragDropTracker(Shell::GetPrimaryRootWindow(), NULL));
- ui::MouseEvent e(ui::ET_MOUSE_DRAGGED, location, location,
- ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
+ ui::MouseEvent e(ui::ET_MOUSE_DRAGGED, gfx::PointF(location),
+ gfx::PointF(location), ui::EventTimeForNow(), ui::EF_NONE,
+ ui::EF_NONE);
aura::Window* target = tracker->GetTarget(e);
return target;
}
@@ -130,8 +131,8 @@ TEST_F(DragDropTrackerTest, ConvertEvent) {
// Start tracking from the RootWindow0 and converts the mouse event into
// |window0|'s coodinates.
- ui::MouseEvent original00(ui::ET_MOUSE_DRAGGED, gfx::Point(50, 50),
- gfx::Point(50, 50), ui::EventTimeForNow(),
+ ui::MouseEvent original00(ui::ET_MOUSE_DRAGGED, gfx::PointF(50.f, 50.f),
+ gfx::PointF(50.f, 50.f), ui::EventTimeForNow(),
ui::EF_NONE, ui::EF_NONE);
scoped_ptr<ui::LocatedEvent> converted00(ConvertEvent(window0.get(),
original00));
@@ -142,8 +143,8 @@ TEST_F(DragDropTrackerTest, ConvertEvent) {
// Start tracking from the RootWindow0 and converts the mouse event into
// |window1|'s coodinates.
- ui::MouseEvent original01(ui::ET_MOUSE_DRAGGED, gfx::Point(350, 150),
- gfx::Point(350, 150), ui::EventTimeForNow(),
+ ui::MouseEvent original01(ui::ET_MOUSE_DRAGGED, gfx::PointF(350.f, 150.f),
+ gfx::PointF(350.f, 150.f), ui::EventTimeForNow(),
ui::EF_NONE, ui::EF_NONE);
scoped_ptr<ui::LocatedEvent> converted01(ConvertEvent(window1.get(),
original01));
@@ -157,8 +158,8 @@ TEST_F(DragDropTrackerTest, ConvertEvent) {
// Start tracking from the RootWindow1 and converts the mouse event into
// |window0|'s coodinates.
- ui::MouseEvent original10(ui::ET_MOUSE_DRAGGED, gfx::Point(-150, 50),
- gfx::Point(-150, 50), ui::EventTimeForNow(),
+ ui::MouseEvent original10(ui::ET_MOUSE_DRAGGED, gfx::PointF(-150.f, 50.f),
+ gfx::PointF(-150.f, 50.f), ui::EventTimeForNow(),
ui::EF_NONE, ui::EF_NONE);
scoped_ptr<ui::LocatedEvent> converted10(ConvertEvent(window0.get(),
original10));
@@ -169,8 +170,8 @@ TEST_F(DragDropTrackerTest, ConvertEvent) {
// Start tracking from the RootWindow1 and converts the mouse event into
// |window1|'s coodinates.
- ui::MouseEvent original11(ui::ET_MOUSE_DRAGGED, gfx::Point(150, 150),
- gfx::Point(150, 150), ui::EventTimeForNow(),
+ ui::MouseEvent original11(ui::ET_MOUSE_DRAGGED, gfx::PointF(150.f, 150.f),
+ gfx::PointF(150.f, 150.f), ui::EventTimeForNow(),
ui::EF_NONE, ui::EF_NONE);
scoped_ptr<ui::LocatedEvent> converted11(ConvertEvent(window1.get(),
original11));

Powered by Google App Engine
This is Rietveld 408576698