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

Unified Diff: ui/chromeos/touch_exploration_controller_unittest.cc

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gesture recognizer tests Created 4 years, 7 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/chromeos/touch_exploration_controller_unittest.cc
diff --git a/ui/chromeos/touch_exploration_controller_unittest.cc b/ui/chromeos/touch_exploration_controller_unittest.cc
index 651dd12ac2e92fcb447ccc99225e0291da52fa82..e76ba545d32fb428f4dcea28bbfc95f7febb8a46 100644
--- a/ui/chromeos/touch_exploration_controller_unittest.cc
+++ b/ui/chromeos/touch_exploration_controller_unittest.cc
@@ -836,10 +836,10 @@ TEST_F(TouchExplorationTest, DoubleTapLongPress) {
ASSERT_EQ(2U, captured_events.size());
EXPECT_EQ(ui::ET_TOUCH_PRESSED, captured_events[0]->type());
EXPECT_EQ(tap_location, captured_events[0]->location());
- base::TimeDelta pressed_time = captured_events[0]->time_stamp();
+ base::TimeTicks pressed_time = captured_events[0]->time_stamp();
EXPECT_EQ(ui::ET_TOUCH_RELEASED, captured_events[1]->type());
EXPECT_EQ(tap_location, captured_events[1]->location());
- base::TimeDelta released_time = captured_events[1]->time_stamp();
+ base::TimeTicks released_time = captured_events[1]->time_stamp();
EXPECT_EQ(released_time - pressed_time,
gesture_detector_config_.longpress_timeout);
}
@@ -1047,10 +1047,10 @@ TEST_F(TouchExplorationTest, SplitTapLongPress) {
ASSERT_EQ(2U, captured_events.size());
EXPECT_EQ(ui::ET_TOUCH_PRESSED, captured_events[0]->type());
EXPECT_EQ(initial_touch_location, captured_events[0]->location());
- base::TimeDelta pressed_time = captured_events[0]->time_stamp();
+ base::TimeTicks pressed_time = captured_events[0]->time_stamp();
EXPECT_EQ(ui::ET_TOUCH_RELEASED, captured_events[1]->type());
EXPECT_EQ(initial_touch_location, captured_events[1]->location());
- base::TimeDelta released_time = captured_events[1]->time_stamp();
+ base::TimeTicks released_time = captured_events[1]->time_stamp();
EXPECT_EQ(gesture_detector_config_.longpress_timeout,
released_time - pressed_time);
}
@@ -1094,10 +1094,10 @@ TEST_F(TouchExplorationTest, SplitTapReleaseLongPress) {
ASSERT_EQ(2U, captured_events.size());
EXPECT_EQ(ui::ET_TOUCH_PRESSED, captured_events[0]->type());
EXPECT_EQ(initial_touch_location, captured_events[0]->location());
- base::TimeDelta pressed_time = captured_events[0]->time_stamp();
+ base::TimeTicks pressed_time = captured_events[0]->time_stamp();
EXPECT_EQ(ui::ET_TOUCH_RELEASED, captured_events[1]->type());
EXPECT_EQ(initial_touch_location, captured_events[1]->location());
- base::TimeDelta released_time = captured_events[1]->time_stamp();
+ base::TimeTicks released_time = captured_events[1]->time_stamp();
EXPECT_EQ(gesture_detector_config_.longpress_timeout,
released_time - pressed_time);
}

Powered by Google App Engine
This is Rietveld 408576698