OLD | NEW |
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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 std::set<uint32_t> installed_accelerators_; | 61 std::set<uint32_t> installed_accelerators_; |
62 std::unique_ptr<base::RunLoop> run_loop_; | 62 std::unique_ptr<base::RunLoop> run_loop_; |
63 mojo::Binding<AcceleratorHandler> binding_; | 63 mojo::Binding<AcceleratorHandler> binding_; |
64 AcceleratorRegistrarPtr registrar_; | 64 AcceleratorRegistrarPtr registrar_; |
65 bool add_accelerator_result_; | 65 bool add_accelerator_result_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(TestAcceleratorHandler); | 67 DISALLOW_COPY_AND_ASSIGN(TestAcceleratorHandler); |
68 }; | 68 }; |
69 | 69 |
70 class AcceleratorRegistrarTest : public mojo::test::ShellTest { | 70 class AcceleratorRegistrarTest : public shell::test::ShellTest { |
71 public: | 71 public: |
72 AcceleratorRegistrarTest() : mojo::test::ShellTest("exe:mash_unittests") {} | 72 AcceleratorRegistrarTest() : shell::test::ShellTest("exe:mash_unittests") {} |
73 ~AcceleratorRegistrarTest() override {} | 73 ~AcceleratorRegistrarTest() override {} |
74 | 74 |
75 protected: | 75 protected: |
76 void ConnectToRegistrar(AcceleratorRegistrarPtr* registrar) { | 76 void ConnectToRegistrar(AcceleratorRegistrarPtr* registrar) { |
77 connector()->ConnectToInterface("mojo:desktop_wm", registrar); | 77 connector()->ConnectToInterface("mojo:desktop_wm", registrar); |
78 } | 78 } |
79 | 79 |
80 private: | 80 private: |
81 DISALLOW_COPY_AND_ASSIGN(AcceleratorRegistrarTest); | 81 DISALLOW_COPY_AND_ASSIGN(AcceleratorRegistrarTest); |
82 }; | 82 }; |
(...skipping 24 matching lines...) Expand all Loading... |
107 EXPECT_FALSE(handler_first.AttemptToInstallAccelerator( | 107 EXPECT_FALSE(handler_first.AttemptToInstallAccelerator( |
108 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N, | 108 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N, |
109 mus::mojom::kEventFlagShiftDown))); | 109 mus::mojom::kEventFlagShiftDown))); |
110 EXPECT_FALSE(handler_second.AttemptToInstallAccelerator( | 110 EXPECT_FALSE(handler_second.AttemptToInstallAccelerator( |
111 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N, | 111 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N, |
112 mus::mojom::kEventFlagShiftDown))); | 112 mus::mojom::kEventFlagShiftDown))); |
113 } | 113 } |
114 | 114 |
115 } // namespace wm | 115 } // namespace wm |
116 } // namespace mash | 116 } // namespace mash |
OLD | NEW |