| Index: ash/mus/accelerator_registrar_unittest.cc
|
| diff --git a/mash/wm/accelerator_registrar_unittest.cc b/ash/mus/accelerator_registrar_unittest.cc
|
| similarity index 75%
|
| rename from mash/wm/accelerator_registrar_unittest.cc
|
| rename to ash/mus/accelerator_registrar_unittest.cc
|
| index f108c69b0fd60d20382cb3a29b2fd2fc15985a3b..f9336fbbefc81ed2562e3f2949e9c30d1e3a8a83 100644
|
| --- a/mash/wm/accelerator_registrar_unittest.cc
|
| +++ b/ash/mus/accelerator_registrar_unittest.cc
|
| @@ -15,13 +15,13 @@
|
| #include "mojo/public/cpp/bindings/binding.h"
|
| #include "services/shell/public/cpp/shell_test.h"
|
|
|
| -using mus::mojom::AcceleratorHandler;
|
| -using mus::mojom::AcceleratorHandlerPtr;
|
| -using mus::mojom::AcceleratorRegistrar;
|
| -using mus::mojom::AcceleratorRegistrarPtr;
|
| +using ::mus::mojom::AcceleratorHandler;
|
| +using ::mus::mojom::AcceleratorHandlerPtr;
|
| +using ::mus::mojom::AcceleratorRegistrar;
|
| +using ::mus::mojom::AcceleratorRegistrarPtr;
|
|
|
| -namespace mash {
|
| -namespace wm {
|
| +namespace ash {
|
| +namespace mus {
|
|
|
| class TestAcceleratorHandler : public AcceleratorHandler {
|
| public:
|
| @@ -36,7 +36,7 @@ class TestAcceleratorHandler : public AcceleratorHandler {
|
| // Attempts to install an accelerator with the specified id and event matcher.
|
| // Returns whether the accelerator could be successfully added or not.
|
| bool AttemptToInstallAccelerator(uint32_t accelerator_id,
|
| - mus::mojom::EventMatcherPtr matcher) {
|
| + ::mus::mojom::EventMatcherPtr matcher) {
|
| DCHECK(!run_loop_);
|
| registrar_->AddAccelerator(
|
| accelerator_id, std::move(matcher),
|
| @@ -56,7 +56,7 @@ class TestAcceleratorHandler : public AcceleratorHandler {
|
| }
|
|
|
| // AcceleratorHandler:
|
| - void OnAccelerator(uint32_t id, mus::mojom::EventPtr event) override {}
|
| + void OnAccelerator(uint32_t id, ::mus::mojom::EventPtr event) override {}
|
|
|
| std::set<uint32_t> installed_accelerators_;
|
| std::unique_ptr<base::RunLoop> run_loop_;
|
| @@ -86,13 +86,13 @@ TEST_F(AcceleratorRegistrarTest, AcceleratorRegistrarBasic) {
|
| ConnectToRegistrar(®istrar_first);
|
| TestAcceleratorHandler handler_first(std::move(registrar_first));
|
| EXPECT_TRUE(handler_first.AttemptToInstallAccelerator(
|
| - 1, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::T,
|
| - mus::mojom::kEventFlagShiftDown)));
|
| + 1, ::mus::CreateKeyMatcher(::mus::mojom::KeyboardCode::T,
|
| + ::mus::mojom::kEventFlagShiftDown)));
|
| // Attempting to add an accelerator with the same accelerator id from the same
|
| // registrar should fail.
|
| EXPECT_FALSE(handler_first.AttemptToInstallAccelerator(
|
| - 1, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N,
|
| - mus::mojom::kEventFlagShiftDown)));
|
| + 1, ::mus::CreateKeyMatcher(::mus::mojom::KeyboardCode::N,
|
| + ::mus::mojom::kEventFlagShiftDown)));
|
|
|
| // Attempting to add an accelerator with the same id from a different
|
| // registrar should be OK.
|
| @@ -100,17 +100,17 @@ TEST_F(AcceleratorRegistrarTest, AcceleratorRegistrarBasic) {
|
| ConnectToRegistrar(®istrar_second);
|
| TestAcceleratorHandler handler_second(std::move(registrar_second));
|
| EXPECT_TRUE(handler_second.AttemptToInstallAccelerator(
|
| - 1, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N,
|
| - mus::mojom::kEventFlagShiftDown)));
|
| + 1, ::mus::CreateKeyMatcher(::mus::mojom::KeyboardCode::N,
|
| + ::mus::mojom::kEventFlagShiftDown)));
|
|
|
| // But attempting to add an accelerator with the same matcher should fail.
|
| EXPECT_FALSE(handler_first.AttemptToInstallAccelerator(
|
| - 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N,
|
| - mus::mojom::kEventFlagShiftDown)));
|
| + 3, ::mus::CreateKeyMatcher(::mus::mojom::KeyboardCode::N,
|
| + ::mus::mojom::kEventFlagShiftDown)));
|
| EXPECT_FALSE(handler_second.AttemptToInstallAccelerator(
|
| - 3, mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N,
|
| - mus::mojom::kEventFlagShiftDown)));
|
| + 3, ::mus::CreateKeyMatcher(::mus::mojom::KeyboardCode::N,
|
| + ::mus::mojom::kEventFlagShiftDown)));
|
| }
|
|
|
| -} // namespace wm
|
| -} // namespace mash
|
| +} // namespace mus
|
| +} // namespace ash
|
|
|