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

Unified Diff: ui/views/widget/widget_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, 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/views/widget/widget_unittest.cc
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 3dfd3572eb13c4c8a35543682d3651ba3ac60d6f..964c4c9636ea272bb038068f581cd28b1314dbb9 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -1488,23 +1488,14 @@ TEST_F(WidgetTest, GestureScrollEventDispatching) {
{
ui::GestureEvent begin(
- 5,
- 5,
- 0,
- base::TimeDelta(),
+ 5, 5, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_SCROLL_BEGIN));
widget->OnGestureEvent(&begin);
ui::GestureEvent update(
- 25,
- 15,
- 0,
- base::TimeDelta(),
+ 25, 15, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_SCROLL_UPDATE, 20, 10));
widget->OnGestureEvent(&update);
- ui::GestureEvent end(25,
- 15,
- 0,
- base::TimeDelta(),
+ ui::GestureEvent end(25, 15, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_SCROLL_END));
widget->OnGestureEvent(&end);
@@ -1515,23 +1506,14 @@ TEST_F(WidgetTest, GestureScrollEventDispatching) {
{
ui::GestureEvent begin(
- 65,
- 5,
- 0,
- base::TimeDelta(),
+ 65, 5, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_SCROLL_BEGIN));
widget->OnGestureEvent(&begin);
ui::GestureEvent update(
- 85,
- 15,
- 0,
- base::TimeDelta(),
+ 85, 15, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_SCROLL_UPDATE, 20, 10));
widget->OnGestureEvent(&update);
- ui::GestureEvent end(85,
- 15,
- 0,
- base::TimeDelta(),
+ ui::GestureEvent end(85, 15, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_SCROLL_END));
widget->OnGestureEvent(&end);
@@ -2260,10 +2242,7 @@ TEST_F(WidgetTest, MAYBE_DisableTestRootViewHandlersWhenHidden) {
// Check RootView::gesture_handler_.
widget->Show();
EXPECT_EQ(NULL, GetGestureHandler(root_view));
- ui::GestureEvent tap_down(15,
- 15,
- 0,
- base::TimeDelta(),
+ ui::GestureEvent tap_down(15, 15, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_TAP_DOWN));
widget->OnGestureEvent(&tap_down);
EXPECT_EQ(view, GetGestureHandler(root_view));
@@ -2280,11 +2259,11 @@ class GestureEventForTest : public ui::GestureEvent {
: GestureEvent(x,
y,
0,
- base::TimeDelta(),
+ base::TimeTicks(),
ui::GestureEventDetails(type)) {}
GestureEventForTest(ui::GestureEventDetails details, int x, int y)
- : GestureEvent(x, y, 0, base::TimeDelta(), details) {}
+ : GestureEvent(x, y, 0, base::TimeTicks(), details) {}
};
// Tests that the |gesture_handler_| member in RootView is always NULL

Powered by Google App Engine
This is Rietveld 408576698