Index: ash/mus/window_manager_unittest.cc |
diff --git a/mash/wm/window_manager_unittest.cc b/ash/mus/window_manager_unittest.cc |
similarity index 74% |
rename from mash/wm/window_manager_unittest.cc |
rename to ash/mus/window_manager_unittest.cc |
index fec346500d536938ffa224d772001946385e9cd5..cf228cf4a60fd97fc92d89cf435fb9a4a78e3f7e 100644 |
--- a/mash/wm/window_manager_unittest.cc |
+++ b/ash/mus/window_manager_unittest.cc |
@@ -17,19 +17,20 @@ |
#include "components/mus/public/interfaces/window_tree.mojom.h" |
#include "services/shell/public/cpp/shell_test.h" |
-namespace mash { |
-namespace wm { |
+namespace ash { |
+namespace mus { |
-class WindowTreeClientDelegate : public mus::WindowTreeClientDelegate { |
+class WindowTreeClientDelegate : public ::mus::WindowTreeClientDelegate { |
public: |
WindowTreeClientDelegate() {} |
~WindowTreeClientDelegate() override {} |
private: |
// mus::WindowTreeClientDelegate: |
- void OnEmbed(mus::Window* root) override {} |
- void OnWindowTreeClientDestroyed(mus::WindowTreeClient* client) override {} |
- void OnEventObserved(const ui::Event& event, mus::Window* target) override {} |
+ void OnEmbed(::mus::Window* root) override {} |
+ void OnWindowTreeClientDestroyed(::mus::WindowTreeClient* client) override {} |
+ void OnEventObserved(const ui::Event& event, ::mus::Window* target) override { |
+ } |
DISALLOW_COPY_AND_ASSIGN(WindowTreeClientDelegate); |
}; |
@@ -47,7 +48,7 @@ void OnEmbed(bool success) { |
ASSERT_TRUE(success); |
} |
-class TestUserWindowObserver : public ash::mojom::UserWindowObserver { |
+class TestUserWindowObserver : public mojom::UserWindowObserver { |
public: |
explicit TestUserWindowObserver(shell::Connector* connector) |
: binding_(this), window_count_(0u), expected_window_count_(0u) { |
@@ -78,12 +79,12 @@ class TestUserWindowObserver : public ash::mojom::UserWindowObserver { |
// mojom::UserWindowObserver: |
void OnUserWindowObserverAdded( |
- mojo::Array<ash::mojom::UserWindowPtr> user_windows) override { |
+ mojo::Array<mojom::UserWindowPtr> user_windows) override { |
window_count_ = user_windows.size(); |
QuitIfNecessary(); |
} |
- void OnUserWindowAdded(ash::mojom::UserWindowPtr user_window) override { |
+ void OnUserWindowAdded(mojom::UserWindowPtr user_window) override { |
++window_count_; |
QuitIfNecessary(); |
} |
@@ -100,8 +101,8 @@ class TestUserWindowObserver : public ash::mojom::UserWindowObserver { |
void OnUserWindowAppIconChanged(uint32_t window_id, |
mojo::Array<uint8_t> app_icon) override {} |
- ash::mojom::UserWindowControllerPtr user_window_controller_; |
- mojo::Binding<ash::mojom::UserWindowObserver> binding_; |
+ mojom::UserWindowControllerPtr user_window_controller_; |
+ mojo::Binding<mojom::UserWindowObserver> binding_; |
size_t window_count_; |
size_t expected_window_count_; |
@@ -118,23 +119,23 @@ TEST_F(WindowManagerTest, OpenWindow) { |
// Connect to mus and create a new top level window. The request goes to |
// the |desktop_wm|, but is async. |
- std::unique_ptr<mus::WindowTreeClient> client( |
- new mus::WindowTreeClient(&window_tree_delegate, nullptr, nullptr)); |
+ std::unique_ptr<::mus::WindowTreeClient> client( |
+ new ::mus::WindowTreeClient(&window_tree_delegate, nullptr, nullptr)); |
client->ConnectViaWindowTreeFactory(connector()); |
- mus::Window* top_level_window = client->NewTopLevelWindow(nullptr); |
+ ::mus::Window* top_level_window = client->NewTopLevelWindow(nullptr); |
ASSERT_TRUE(top_level_window); |
- mus::Window* child_window = client->NewWindow(); |
+ ::mus::Window* child_window = client->NewWindow(); |
ASSERT_TRUE(child_window); |
top_level_window->AddChild(child_window); |
// Create another WindowTreeClient by way of embedding in |
// |child_window|. This blocks until it succeeds. |
- mus::mojom::WindowTreeClientPtr tree_client; |
+ ::mus::mojom::WindowTreeClientPtr tree_client; |
auto tree_client_request = GetProxy(&tree_client); |
child_window->Embed(std::move(tree_client), base::Bind(&OnEmbed)); |
- std::unique_ptr<mus::WindowTreeClient> child_client( |
- new mus::WindowTreeClient(&window_tree_delegate, nullptr, |
- std::move(tree_client_request))); |
+ std::unique_ptr<::mus::WindowTreeClient> child_client( |
+ new ::mus::WindowTreeClient(&window_tree_delegate, nullptr, |
+ std::move(tree_client_request))); |
child_client->WaitForEmbed(); |
ASSERT_TRUE(!child_client->GetRoots().empty()); |
} |
@@ -147,10 +148,10 @@ TEST_F(WindowManagerTest, OpenWindowAndClose) { |
// Connect to mus and create a new top level window. |
WindowTreeClientDelegate window_tree_delegate; |
- std::unique_ptr<mus::WindowTreeClient> client( |
- new mus::WindowTreeClient(&window_tree_delegate, nullptr, nullptr)); |
+ std::unique_ptr<::mus::WindowTreeClient> client( |
+ new ::mus::WindowTreeClient(&window_tree_delegate, nullptr, nullptr)); |
client->ConnectViaWindowTreeFactory(connector()); |
- mus::Window* top_level_window = client->NewTopLevelWindow(nullptr); |
+ ::mus::Window* top_level_window = client->NewTopLevelWindow(nullptr); |
ASSERT_TRUE(top_level_window); |
observer.WaitUntilWindowCountReaches(1u); |
@@ -158,5 +159,5 @@ TEST_F(WindowManagerTest, OpenWindowAndClose) { |
observer.WaitUntilWindowCountReaches(0u); |
} |
-} // namespace wm |
-} // namespace mash |
+} // namespace mus |
+} // namespace ash |