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

Side by Side Diff: ash/wm/window_manager_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/wm/system_gesture_event_filter_unittest.cc ('k') | base/time/time.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell_window_ids.h" 5 #include "ash/common/shell_window_ids.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/test/test_activation_delegate.h" 8 #include "ash/test/test_activation_delegate.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "ui/aura/client/cursor_client_observer.h" 10 #include "ui/aura/client/cursor_client_observer.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 did_visibility_change_ = true; 42 did_visibility_change_ = true;
43 } 43 }
44 44
45 private: 45 private:
46 bool cursor_visibility_; 46 bool cursor_visibility_;
47 bool did_visibility_change_; 47 bool did_visibility_change_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(TestingCursorClientObserver); 49 DISALLOW_COPY_AND_ASSIGN(TestingCursorClientObserver);
50 }; 50 };
51 51
52 base::TimeDelta getTime() { 52 base::TimeTicks getTime() {
53 return ui::EventTimeForNow(); 53 return ui::EventTimeForNow();
54 } 54 }
55 55
56 // A slightly changed TestEventHandler which can be configured to return a 56 // A slightly changed TestEventHandler which can be configured to return a
57 // specified value for key/mouse event handling. 57 // specified value for key/mouse event handling.
58 class CustomEventHandler : public ui::test::TestEventHandler { 58 class CustomEventHandler : public ui::test::TestEventHandler {
59 public: 59 public:
60 CustomEventHandler() 60 CustomEventHandler()
61 : key_result_(ui::ER_UNHANDLED), 61 : key_result_(ui::ER_UNHANDLED),
62 mouse_result_(ui::ER_UNHANDLED) { 62 mouse_result_(ui::ER_UNHANDLED) {
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 generator.MoveMouseTo(50, 50); 850 generator.MoveMouseTo(50, 50);
851 EXPECT_TRUE(observer_a.did_visibility_change()); 851 EXPECT_TRUE(observer_a.did_visibility_change());
852 EXPECT_FALSE(observer_b.did_visibility_change()); 852 EXPECT_FALSE(observer_b.did_visibility_change());
853 EXPECT_TRUE(observer_a.is_cursor_visible()); 853 EXPECT_TRUE(observer_a.is_cursor_visible());
854 854
855 cursor_manager->RemoveObserver(&observer_a); 855 cursor_manager->RemoveObserver(&observer_a);
856 } 856 }
857 #endif // defined(OS_CHROMEOS) 857 #endif // defined(OS_CHROMEOS)
858 858
859 } // namespace ash 859 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | base/time/time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698