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

Unified Diff: ash/laser/laser_pointer_points_unittest.cc

Issue 2745953002: ash: Add basic prediction code to the laser pointer. (Closed)
Patch Set: more tests and nits Created 3 years, 9 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_test_api.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 cad8c7e940a24d93d7dc22708b58fa859b4bc0ea..60161e61af3dbd7c9b9d53d371e3ca56c6ccd235 100644
--- a/ash/laser/laser_pointer_points_unittest.cc
+++ b/ash/laser/laser_pointer_points_unittest.cc
@@ -37,15 +37,15 @@ TEST_F(LaserPointerPointsTest, LaserPointerInternalCollection) {
const gfx::PointF bottom(1, 9);
const gfx::PointF top_right(30, 0);
const gfx::PointF last(2, 2);
- points_.AddPoint(left);
+ points_.AddPoint(left, base::TimeTicks());
EXPECT_EQ(gfx::Rect(1, 1, 0, 0), points_.GetBoundingBox());
// Should be the new bottom of the bounding box.
- points_.AddPoint(bottom);
+ points_.AddPoint(bottom, base::TimeTicks());
EXPECT_EQ(gfx::Rect(1, 1, 0, bottom.y() - 1), points_.GetBoundingBox());
// Should be the new top and right of the bounding box.
- points_.AddPoint(top_right);
+ points_.AddPoint(top_right, base::TimeTicks());
EXPECT_EQ(3, points_.GetNumberOfPoints());
EXPECT_FALSE(points_.IsEmpty());
EXPECT_EQ(gfx::Rect(left.x(), top_right.y(), top_right.x() - left.x(),
@@ -53,7 +53,7 @@ TEST_F(LaserPointerPointsTest, LaserPointerInternalCollection) {
points_.GetBoundingBox());
// Should not expand bounding box.
- points_.AddPoint(last);
+ points_.AddPoint(last, base::TimeTicks());
EXPECT_EQ(gfx::Rect(left.x(), top_right.y(), top_right.x() - left.x(),
bottom.y() - top_right.y()),
points_.GetBoundingBox());
@@ -64,7 +64,7 @@ TEST_F(LaserPointerPointsTest, LaserPointerInternalCollection) {
// Add a new point which will expand the bounding box.
gfx::PointF new_left_bottom(0, 40);
- points_.AddPoint(new_left_bottom);
+ points_.AddPoint(new_left_bottom, base::TimeTicks());
EXPECT_EQ(5, points_.GetNumberOfPoints());
EXPECT_EQ(gfx::Rect(new_left_bottom.x(), top_right.y(),
top_right.x() - new_left_bottom.x(),
« no previous file with comments | « ash/laser/laser_pointer_points_test_api.cc ('k') | ash/laser/laser_pointer_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698