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

Side by Side Diff: components/exo/touch_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 | « components/exo/touch_delegate.h ('k') | components/exo/wayland/server.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/common/wm/window_positioner.h" 5 #include "ash/common/wm/window_positioner.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "ash/wm/window_util.h" 7 #include "ash/wm/window_util.h"
8 #include "components/exo/buffer.h" 8 #include "components/exo/buffer.h"
9 #include "components/exo/shell_surface.h" 9 #include "components/exo/shell_surface.h"
10 #include "components/exo/surface.h" 10 #include "components/exo/surface.h"
(...skipping 11 matching lines...) Expand all
22 using TouchTest = test::ExoTestBase; 22 using TouchTest = test::ExoTestBase;
23 23
24 class MockTouchDelegate : public TouchDelegate { 24 class MockTouchDelegate : public TouchDelegate {
25 public: 25 public:
26 MockTouchDelegate() {} 26 MockTouchDelegate() {}
27 27
28 // Overridden from TouchDelegate: 28 // Overridden from TouchDelegate:
29 MOCK_METHOD1(OnTouchDestroying, void(Touch*)); 29 MOCK_METHOD1(OnTouchDestroying, void(Touch*));
30 MOCK_CONST_METHOD1(CanAcceptTouchEventsForSurface, bool(Surface*)); 30 MOCK_CONST_METHOD1(CanAcceptTouchEventsForSurface, bool(Surface*));
31 MOCK_METHOD4(OnTouchDown, 31 MOCK_METHOD4(OnTouchDown,
32 void(Surface*, base::TimeDelta, int, const gfx::Point&)); 32 void(Surface*, base::TimeTicks, int, const gfx::Point&));
33 MOCK_METHOD2(OnTouchUp, void(base::TimeDelta, int)); 33 MOCK_METHOD2(OnTouchUp, void(base::TimeTicks, int));
34 MOCK_METHOD3(OnTouchMotion, void(base::TimeDelta, int, const gfx::Point&)); 34 MOCK_METHOD3(OnTouchMotion, void(base::TimeTicks, int, const gfx::Point&));
35 MOCK_METHOD0(OnTouchCancel, void()); 35 MOCK_METHOD0(OnTouchCancel, void());
36 }; 36 };
37 37
38 TEST_F(TouchTest, OnTouchDown) { 38 TEST_F(TouchTest, OnTouchDown) {
39 ash::WindowPositioner::DisableAutoPositioning(true); 39 ash::WindowPositioner::DisableAutoPositioning(true);
40 40
41 std::unique_ptr<Surface> bottom_surface(new Surface); 41 std::unique_ptr<Surface> bottom_surface(new Surface);
42 std::unique_ptr<ShellSurface> bottom_shell_surface( 42 std::unique_ptr<ShellSurface> bottom_shell_surface(
43 new ShellSurface(bottom_surface.get())); 43 new ShellSurface(bottom_surface.get()));
44 gfx::Size bottom_buffer_size(10, 10); 44 gfx::Size bottom_buffer_size(10, 10);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ui::TouchEvent cancel_event(ui::ET_TOUCH_CANCELLED, gfx::Point(), 1, 176 ui::TouchEvent cancel_event(ui::ET_TOUCH_CANCELLED, gfx::Point(), 1,
177 generator.Now()); 177 generator.Now());
178 generator.Dispatch(&cancel_event); 178 generator.Dispatch(&cancel_event);
179 179
180 EXPECT_CALL(delegate, OnTouchDestroying(touch.get())); 180 EXPECT_CALL(delegate, OnTouchDestroying(touch.get()));
181 touch.reset(); 181 touch.reset();
182 } 182 }
183 183
184 } // namespace 184 } // namespace
185 } // namespace exo 185 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/touch_delegate.h ('k') | components/exo/wayland/server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698