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

Side by Side Diff: mash/wm/window_manager_apptest.cc

Issue 1492563002: Introduce mash/shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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 unified diff | Download patch
« no previous file with comments | « mash/wm/shelf_layout.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "components/mus/public/cpp/window.h" 6 #include "components/mus/public/cpp/window.h"
7 #include "components/mus/public/cpp/window_tree_connection.h" 7 #include "components/mus/public/cpp/window_tree_connection.h"
8 #include "components/mus/public/cpp/window_tree_delegate.h" 8 #include "components/mus/public/cpp/window_tree_delegate.h"
9 #include "components/mus/public/interfaces/window_manager.mojom.h" 9 #include "components/mus/public/interfaces/window_manager.mojom.h"
10 #include "components/mus/public/interfaces/window_tree.mojom.h" 10 #include "components/mus/public/interfaces/window_tree.mojom.h"
11 #include "mojo/application/public/cpp/application_impl.h" 11 #include "mojo/application/public/cpp/application_impl.h"
12 #include "mojo/application/public/cpp/application_test_base.h" 12 #include "mojo/application/public/cpp/application_test_base.h"
13 13
14 namespace mash { 14 namespace mash {
15 namespace wm { 15 namespace wm {
16 16
17 class WindowManagerAppTest : public mojo::test::ApplicationTestBase, 17 class WindowManagerAppTest : public mojo::test::ApplicationTestBase,
18 public mus::WindowTreeDelegate { 18 public mus::WindowTreeDelegate {
19 public: 19 public:
20 WindowManagerAppTest() {} 20 WindowManagerAppTest() {}
21 ~WindowManagerAppTest() override {} 21 ~WindowManagerAppTest() override {}
22 22
23 protected: 23 protected:
24 void ConnectToWindowManager(mus::mojom::WindowManagerPtr* window_manager) { 24 void ConnectToWindowManager(mus::mojom::WindowManagerPtr* window_manager) {
25 application_impl()->ConnectToService("mojo:mash_wm", window_manager); 25 application_impl()->ConnectToService("mojo:desktop_wm", window_manager);
26 } 26 }
27 27
28 mus::Window* OpenWindow(mus::mojom::WindowManager* window_manager) { 28 mus::Window* OpenWindow(mus::mojom::WindowManager* window_manager) {
29 mus::mojom::WindowTreeClientPtr window_tree_client; 29 mus::mojom::WindowTreeClientPtr window_tree_client;
30 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> 30 mojo::InterfaceRequest<mus::mojom::WindowTreeClient>
31 window_tree_client_request = GetProxy(&window_tree_client); 31 window_tree_client_request = GetProxy(&window_tree_client);
32 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties; 32 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties;
33 properties.mark_non_null(); 33 properties.mark_non_null();
34 window_manager->OpenWindow(window_tree_client.Pass(), properties.Pass()); 34 window_manager->OpenWindow(window_tree_client.Pass(), properties.Pass());
35 mus::WindowTreeConnection* connection = mus::WindowTreeConnection::Create( 35 mus::WindowTreeConnection* connection = mus::WindowTreeConnection::Create(
(...skipping 12 matching lines...) Expand all
48 48
49 TEST_F(WindowManagerAppTest, OpenWindow) { 49 TEST_F(WindowManagerAppTest, OpenWindow) {
50 mus::mojom::WindowManagerPtr connection; 50 mus::mojom::WindowManagerPtr connection;
51 ConnectToWindowManager(&connection); 51 ConnectToWindowManager(&connection);
52 52
53 ASSERT_TRUE(OpenWindow(connection.get())); 53 ASSERT_TRUE(OpenWindow(connection.get()));
54 } 54 }
55 55
56 } // namespace wm 56 } // namespace wm
57 } // namespace mash 57 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/shelf_layout.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698