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

Unified Diff: ui/views/controls/single_split_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/single_split_view_unittest.cc
diff --git a/ui/views/controls/single_split_view_unittest.cc b/ui/views/controls/single_split_view_unittest.cc
index f56e497bc5197db550e2a105d6d720dc56d246e1..b78d91e913c926d8b8841d50c47062290a8e449f 100644
--- a/ui/views/controls/single_split_view_unittest.cc
+++ b/ui/views/controls/single_split_view_unittest.cc
@@ -168,7 +168,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
split.set_divider_offset(kInitialDividerOffset);
split.Layout();
- gfx::Point press_point(7, kInitialDividerOffset + kMouseOffset);
+ gfx::PointF press_point(7, kInitialDividerOffset + kMouseOffset);
ui::MouseEvent mouse_pressed(ui::ET_MOUSE_PRESSED, press_point, press_point,
ui::EventTimeForNow(), 0, 0);
ASSERT_TRUE(split.OnMousePressed(mouse_pressed));
@@ -176,7 +176,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
EXPECT_EQ(0, listener.count());
// Drag divider to the bottom.
- gfx::Point drag_1_point(
+ gfx::PointF drag_1_point(
5, kInitialDividerOffset + kMouseOffset + kMouseMoveDelta);
ui::MouseEvent mouse_dragged_1(ui::ET_MOUSE_DRAGGED, drag_1_point,
drag_1_point, ui::EventTimeForNow(), 0, 0);
@@ -185,8 +185,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
EXPECT_EQ(1, listener.count());
// Drag divider to the top, beyond first child minimum size.
- gfx::Point drag_2_point(
- 7, kMinimumChildSize - 5);
+ gfx::PointF drag_2_point(7, kMinimumChildSize - 5);
ui::MouseEvent mouse_dragged_2(ui::ET_MOUSE_DRAGGED, drag_2_point,
drag_2_point, ui::EventTimeForNow(), 0, 0);
ASSERT_TRUE(split.OnMouseDragged(mouse_dragged_2));
@@ -194,8 +193,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
EXPECT_EQ(2, listener.count());
// Drag divider to the bottom, beyond second child minimum size.
- gfx::Point drag_3_point(
- 7, kTotalSplitSize - kMinimumChildSize + 5);
+ gfx::PointF drag_3_point(7, kTotalSplitSize - kMinimumChildSize + 5);
ui::MouseEvent mouse_dragged_3(ui::ET_MOUSE_DRAGGED, drag_3_point,
drag_3_point, ui::EventTimeForNow(), 0, 0);
ASSERT_TRUE(split.OnMouseDragged(mouse_dragged_3));
@@ -204,7 +202,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
EXPECT_EQ(3, listener.count());
// Drag divider between childs' minimum sizes.
- gfx::Point drag_4_point(
+ gfx::PointF drag_4_point(
6, kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2);
ui::MouseEvent mouse_dragged_4(ui::ET_MOUSE_DRAGGED, drag_4_point,
drag_4_point, ui::EventTimeForNow(), 0, 0);
@@ -213,7 +211,7 @@ TEST(SingleSplitViewTest, MouseDrag) {
split.divider_offset());
EXPECT_EQ(4, listener.count());
- gfx::Point release_point(
+ gfx::PointF release_point(
7, kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2);
ui::MouseEvent mouse_released(ui::ET_MOUSE_RELEASED, release_point,
release_point, ui::EventTimeForNow(), 0, 0);

Powered by Google App Engine
This is Rietveld 408576698