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

Unified Diff: content/browser/renderer_host/input/input_router_impl_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
Index: content/browser/renderer_host/input/input_router_impl_unittest.cc
diff --git a/content/browser/renderer_host/input/input_router_impl_unittest.cc b/content/browser/renderer_host/input/input_router_impl_unittest.cc
index 84bc82d86eb4dd24cc1496299f2093a378c46a12..97a9bf0cf097dee132adca4fb5cb781cc4a3077e 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -40,7 +40,6 @@
#include "ui/events/event.h"
#endif
-using base::TimeDelta;
using blink::WebGestureDevice;
using blink::WebGestureEvent;
using blink::WebKeyboardEvent;
@@ -114,7 +113,7 @@ bool TouchEventsAreEquivalent(const ui::TouchEvent& first,
return false;
if (first.touch_id() != second.touch_id())
return false;
- if (second.time_stamp().InSeconds() != first.time_stamp().InSeconds())
+ if (second.time_stamp() != first.time_stamp())
return false;
return true;
}
@@ -266,7 +265,7 @@ class InputRouterImplTest : public testing::Test {
velocity_x, velocity_y, source_device));
}
- void SetTouchTimestamp(base::TimeDelta timestamp) {
+ void SetTouchTimestamp(base::TimeTicks timestamp) {
touch_event_.SetTimestamp(timestamp);
}
@@ -870,7 +869,7 @@ TEST_F(InputRouterImplTest, AckedTouchEventState) {
// Use a custom timestamp for all the events to test that the acked events
// have the same timestamp;
- base::TimeDelta timestamp = base::Time::NowFromSystemTime() - base::Time();
+ base::TimeTicks timestamp = base::TimeTicks::Now();
timestamp -= base::TimeDelta::FromSeconds(600);
// Press the first finger.

Powered by Google App Engine
This is Rietveld 408576698