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

Unified Diff: ash/mus/accelerator_registrar_unittest.cc

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/accelerator_registrar_impl.cc ('k') | ash/mus/app_launch_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(&registrar_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(&registrar_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
« no previous file with comments | « ash/mus/accelerator_registrar_impl.cc ('k') | ash/mus/app_launch_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698