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

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: rebase Created 4 years, 6 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 | « ui/chromeos/touch_exploration_controller.cc ('k') | ui/events/base_event_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eae4a83c8e02b74a46f795b95084be6cd24fe4af..d811d2bca9e4df6e709ddb75edefad3d68d84d55 100644
--- a/ui/chromeos/touch_exploration_controller_unittest.cc
+++ b/ui/chromeos/touch_exploration_controller_unittest.cc
@@ -392,11 +392,10 @@ class TouchExplorationTest : public aura::test::AuraTestBase {
return touch_exploration_controller_->GetSlopDistanceFromEdge();
}
- base::TimeDelta Now() {
+ base::TimeTicks Now() {
// This is the same as what EventTimeForNow() does, but here we do it
// with our simulated clock.
- return base::TimeDelta::FromInternalValue(
- simulated_clock_->NowTicks().ToInternalValue());
+ return simulated_clock_->NowTicks();
}
void SetTouchAccessibilityAnchorPoint(const gfx::Point& location) {
@@ -883,10 +882,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);
}
« no previous file with comments | « ui/chromeos/touch_exploration_controller.cc ('k') | ui/events/base_event_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698