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

Side by Side Diff: ash/wm/gestures/overview_gesture_handler_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 unified diff | Download patch
« no previous file with comments | « ash/touch/touch_uma.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "ash/test/ash_test_base.h" 7 #include "ash/test/ash_test_base.h"
8 #include "ash/wm/overview/window_selector_controller.h" 8 #include "ash/wm/overview/window_selector_controller.h"
9 #include "ui/aura/test/test_window_delegate.h" 9 #include "ui/aura/test/test_window_delegate.h"
10 #include "ui/aura/test/test_windows.h" 10 #include "ui/aura/test/test_windows.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 // Tests a swipe up with three fingers without releasing followed by a swipe 82 // Tests a swipe up with three fingers without releasing followed by a swipe
83 // down by a lesser amount which should still be enough to exit. 83 // down by a lesser amount which should still be enough to exit.
84 TEST_F(OverviewGestureHandlerTest, SwipeUpDownWithoutReleasing) { 84 TEST_F(OverviewGestureHandlerTest, SwipeUpDownWithoutReleasing) {
85 gfx::Rect bounds(0, 0, 400, 400); 85 gfx::Rect bounds(0, 0, 400, 400);
86 aura::Window* root_window = Shell::GetPrimaryRootWindow(); 86 aura::Window* root_window = Shell::GetPrimaryRootWindow();
87 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); 87 std::unique_ptr<aura::Window> window1(CreateWindow(bounds));
88 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); 88 std::unique_ptr<aura::Window> window2(CreateWindow(bounds));
89 ui::test::EventGenerator generator(root_window, root_window); 89 ui::test::EventGenerator generator(root_window, root_window);
90 base::TimeDelta timestamp = base::TimeDelta::FromInternalValue( 90 base::TimeTicks timestamp = base::TimeTicks::Now();
91 base::TimeTicks::Now().ToInternalValue());
92 gfx::Point start; 91 gfx::Point start;
93 int num_fingers = 3; 92 int num_fingers = 3;
94 base::TimeDelta step_delay(base::TimeDelta::FromMilliseconds(5)); 93 base::TimeDelta step_delay(base::TimeDelta::FromMilliseconds(5));
95 ui::ScrollEvent fling_cancel(ui::ET_SCROLL_FLING_CANCEL, 94 ui::ScrollEvent fling_cancel(ui::ET_SCROLL_FLING_CANCEL,
96 start, 95 start,
97 timestamp, 96 timestamp,
98 0, 97 0,
99 0, 0, 98 0, 0,
100 0, 0, 99 0, 0,
101 num_fingers); 100 num_fingers);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 start, 133 start,
135 timestamp, 134 timestamp,
136 0, 135 0,
137 0, 10, 136 0, 10,
138 0, 10, 137 0, 10,
139 num_fingers); 138 num_fingers);
140 generator.Dispatch(&fling_start); 139 generator.Dispatch(&fling_start);
141 } 140 }
142 141
143 } // namespace ash 142 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_uma.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698