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

Unified Diff: ui/views/controls/table/table_view_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/controls/table/table_view_unittest.cc
diff --git a/ui/views/controls/table/table_view_unittest.cc b/ui/views/controls/table/table_view_unittest.cc
index e7d9f87fef474510b63479b66da42f4a8c5e27a6..bf5d52492238d161aa41a4c99d1956952d2b016e 100644
--- a/ui/views/controls/table/table_view_unittest.cc
+++ b/ui/views/controls/table/table_view_unittest.cc
@@ -198,8 +198,8 @@ class TableViewTest : public testing::Test {
void ClickOnRow(int row, int flags) {
const int y = row * table_->row_height();
- const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(0, y),
- gfx::Point(0, y), ui::EventTimeForNow(),
+ const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::PointF(0.f, y),
+ gfx::PointF(0.f, y), ui::EventTimeForNow(),
ui::EF_LEFT_MOUSE_BUTTON | flags,
ui::EF_LEFT_MOUSE_BUTTON);
table_->OnMousePressed(pressed);
@@ -296,13 +296,13 @@ TEST_F(TableViewTest, Resize) {
const int x = table_->visible_columns()[0].width;
EXPECT_NE(0, x);
// Drag the mouse 1 pixel to the left.
- const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(x, 0),
- gfx::Point(x, 0), ui::EventTimeForNow(),
+ const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::PointF(x, 0.f),
+ gfx::PointF(x, 0.f), ui::EventTimeForNow(),
ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
helper_->header()->OnMousePressed(pressed);
- const ui::MouseEvent dragged(ui::ET_MOUSE_DRAGGED, gfx::Point(x - 1, 0),
- gfx::Point(x - 1, 0), ui::EventTimeForNow(),
+ const ui::MouseEvent dragged(ui::ET_MOUSE_DRAGGED, gfx::PointF(x - 1.f, 0.f),
+ gfx::PointF(x - 1.f, 0.f), ui::EventTimeForNow(),
ui::EF_LEFT_MOUSE_BUTTON, 0);
helper_->header()->OnMouseDragged(dragged);
@@ -394,14 +394,14 @@ TEST_F(TableViewTest, SortOnMouse) {
const int x = table_->visible_columns()[0].width / 2;
EXPECT_NE(0, x);
// Press and release the mouse.
- const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(x, 0),
- gfx::Point(x, 0), ui::EventTimeForNow(),
+ const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::PointF(x, 0.f),
+ gfx::PointF(x, 0.f), ui::EventTimeForNow(),
ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
// The header must return true, else it won't normally get the release.
EXPECT_TRUE(helper_->header()->OnMousePressed(pressed));
- const ui::MouseEvent release(ui::ET_MOUSE_RELEASED, gfx::Point(x, 0),
- gfx::Point(x, 0), ui::EventTimeForNow(),
+ const ui::MouseEvent release(ui::ET_MOUSE_RELEASED, gfx::PointF(x, 0.f),
+ gfx::PointF(x, 0.f), ui::EventTimeForNow(),
ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
helper_->header()->OnMouseReleased(release);

Powered by Google App Engine
This is Rietveld 408576698