OLD | NEW |
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/sticky_keys/sticky_keys_controller.h" | 5 #include "ash/sticky_keys/sticky_keys_controller.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/scoped_vector.h" | |
12 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
13 #include "ui/aura/window_tree_host.h" | 12 #include "ui/aura/window_tree_host.h" |
14 #include "ui/events/event_source.h" | 13 #include "ui/events/event_source.h" |
15 #include "ui/events/event_utils.h" | 14 #include "ui/events/event_utils.h" |
16 | 15 |
17 #if defined(USE_X11) | 16 #if defined(USE_X11) |
18 #include <X11/Xlib.h> | 17 #include <X11/Xlib.h> |
19 #undef None | 18 #undef None |
20 #undef Bool | 19 #undef Bool |
21 #undef RootWindow | 20 #undef RootWindow |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 gfx::Point(0, 0))); | 743 gfx::Point(0, 0))); |
745 released = false; | 744 released = false; |
746 mod_down_flags = 0; | 745 mod_down_flags = 0; |
747 sticky_key.HandleMouseEvent(*mev.get(), &mod_down_flags, &released); | 746 sticky_key.HandleMouseEvent(*mev.get(), &mod_down_flags, &released); |
748 EXPECT_TRUE(mod_down_flags & ui::EF_CONTROL_DOWN); | 747 EXPECT_TRUE(mod_down_flags & ui::EF_CONTROL_DOWN); |
749 EXPECT_TRUE(released); | 748 EXPECT_TRUE(released); |
750 EXPECT_EQ(STICKY_KEY_STATE_DISABLED, sticky_key.current_state()); | 749 EXPECT_EQ(STICKY_KEY_STATE_DISABLED, sticky_key.current_state()); |
751 } | 750 } |
752 | 751 |
753 } // namespace ash | 752 } // namespace ash |
OLD | NEW |