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

Unified Diff: ash/laser/laser_pointer_points_unittest.cc

Issue 2716223002: ash: Use floating point precision for laser pointer. (Closed)
Patch Set: rebase and fix unit test Created 3 years, 10 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
« no previous file with comments | « ash/laser/laser_pointer_points.cc ('k') | ash/laser/laser_pointer_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/laser/laser_pointer_points_unittest.cc
diff --git a/ash/laser/laser_pointer_points_unittest.cc b/ash/laser/laser_pointer_points_unittest.cc
index a727cb8cf0e251304cf4cac153348279179de58d..cad8c7e940a24d93d7dc22708b58fa859b4bc0ea 100644
--- a/ash/laser/laser_pointer_points_unittest.cc
+++ b/ash/laser/laser_pointer_points_unittest.cc
@@ -33,10 +33,10 @@ class LaserPointerPointsTest : public test::AshTestBase {
TEST_F(LaserPointerPointsTest, LaserPointerInternalCollection) {
EXPECT_TRUE(points_.IsEmpty());
EXPECT_EQ(gfx::Rect(), points_.GetBoundingBox());
- const gfx::Point left(1, 1);
- const gfx::Point bottom(1, 9);
- const gfx::Point top_right(30, 0);
- const gfx::Point last(2, 2);
+ const gfx::PointF left(1, 1);
+ const gfx::PointF bottom(1, 9);
+ const gfx::PointF top_right(30, 0);
+ const gfx::PointF last(2, 2);
points_.AddPoint(left);
EXPECT_EQ(gfx::Rect(1, 1, 0, 0), points_.GetBoundingBox());
@@ -63,7 +63,7 @@ TEST_F(LaserPointerPointsTest, LaserPointerInternalCollection) {
EXPECT_EQ(last, points_.GetNewest().location);
// Add a new point which will expand the bounding box.
- gfx::Point new_left_bottom(0, 40);
+ gfx::PointF new_left_bottom(0, 40);
points_.AddPoint(new_left_bottom);
EXPECT_EQ(5, points_.GetNumberOfPoints());
EXPECT_EQ(gfx::Rect(new_left_bottom.x(), top_right.y(),
« no previous file with comments | « ash/laser/laser_pointer_points.cc ('k') | ash/laser/laser_pointer_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698