OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/mus/ws/event_matcher.h" | 5 #include "services/ui/ws/event_matcher.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "components/mus/public/interfaces/event_matcher.mojom.h" | 8 #include "services/ui/public/interfaces/event_matcher.mojom.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
11 #include "ui/events/mojo/event_constants.mojom.h" | 11 #include "ui/events/mojo/event_constants.mojom.h" |
12 #include "ui/gfx/geometry/point.h" | 12 #include "ui/gfx/geometry/point.h" |
13 | 13 |
14 namespace mus { | 14 namespace mus { |
15 namespace ws { | 15 namespace ws { |
16 | 16 |
17 // NOTE: Most of the matching functionality is exercised by tests of Accelerator | 17 // NOTE: Most of the matching functionality is exercised by tests of Accelerator |
18 // handling in the EventDispatcher and WindowTree tests. These are just basic | 18 // handling in the EventDispatcher and WindowTree tests. These are just basic |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 ui::KeyEvent control_n(ui::ET_KEY_PRESSED, ui::VKEY_N, ui::EF_CONTROL_DOWN); | 63 ui::KeyEvent control_n(ui::ET_KEY_PRESSED, ui::VKEY_N, ui::EF_CONTROL_DOWN); |
64 EXPECT_TRUE(control_n_matcher.MatchesEvent(control_n)); | 64 EXPECT_TRUE(control_n_matcher.MatchesEvent(control_n)); |
65 | 65 |
66 ui::KeyEvent shift_n(ui::ET_KEY_PRESSED, ui::VKEY_N, ui::EF_SHIFT_DOWN); | 66 ui::KeyEvent shift_n(ui::ET_KEY_PRESSED, ui::VKEY_N, ui::EF_SHIFT_DOWN); |
67 EXPECT_FALSE(control_n_matcher.MatchesEvent(shift_n)); | 67 EXPECT_FALSE(control_n_matcher.MatchesEvent(shift_n)); |
68 } | 68 } |
69 | 69 |
70 } // namespace ws | 70 } // namespace ws |
71 } // namespace mus | 71 } // namespace mus |
OLD | NEW |