| 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 <map> | 5 #include <map> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/public/interfaces/constants.mojom.h" | 9 #include "ash/public/interfaces/constants.mojom.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 TEST_F(MusWindowManagerTest, OpenWindow) { | 81 TEST_F(MusWindowManagerTest, OpenWindow) { |
| 82 display::ScreenBase screen; | 82 display::ScreenBase screen; |
| 83 screen.display_list().AddDisplay( | 83 screen.display_list().AddDisplay( |
| 84 display::Display(1, gfx::Rect(0, 0, 200, 200)), | 84 display::Display(1, gfx::Rect(0, 0, 200, 200)), |
| 85 display::DisplayList::Type::PRIMARY); | 85 display::DisplayList::Type::PRIMARY); |
| 86 display::Screen::SetScreenInstance(&screen); | 86 display::Screen::SetScreenInstance(&screen); |
| 87 | 87 |
| 88 WindowTreeClientDelegate window_tree_delegate; | 88 WindowTreeClientDelegate window_tree_delegate; |
| 89 | 89 |
| 90 connector()->Connect(mojom::kServiceName); | 90 connector()->StartService(mojom::kServiceName); |
| 91 | 91 |
| 92 // Connect to mus and create a new top level window. The request goes to | 92 // Connect to mus and create a new top level window. The request goes to |
| 93 // |ash|, but is async. | 93 // |ash|, but is async. |
| 94 aura::WindowTreeClient client(connector(), &window_tree_delegate, nullptr, | 94 aura::WindowTreeClient client(connector(), &window_tree_delegate, nullptr, |
| 95 nullptr, nullptr, false); | 95 nullptr, nullptr, false); |
| 96 client.ConnectViaWindowTreeFactory(); | 96 client.ConnectViaWindowTreeFactory(); |
| 97 aura::test::EnvTestHelper().SetWindowTreeClient(&client); | 97 aura::test::EnvTestHelper().SetWindowTreeClient(&client); |
| 98 std::map<std::string, std::vector<uint8_t>> properties; | 98 std::map<std::string, std::vector<uint8_t>> properties; |
| 99 properties[ui::mojom::WindowManager::kWindowType_InitProperty] = | 99 properties[ui::mojom::WindowManager::kWindowType_InitProperty] = |
| 100 mojo::ConvertTo<std::vector<uint8_t>>( | 100 mojo::ConvertTo<std::vector<uint8_t>>( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 114 aura::WindowTreeClient child_client(connector(), &window_tree_delegate, | 114 aura::WindowTreeClient child_client(connector(), &window_tree_delegate, |
| 115 nullptr, std::move(tree_client_request), | 115 nullptr, std::move(tree_client_request), |
| 116 nullptr, false); | 116 nullptr, false); |
| 117 window_tree_delegate.WaitForEmbed(); | 117 window_tree_delegate.WaitForEmbed(); |
| 118 ASSERT_TRUE(!child_client.GetRoots().empty()); | 118 ASSERT_TRUE(!child_client.GetRoots().empty()); |
| 119 window_tree_delegate.DestroyWindowTreeHost(); | 119 window_tree_delegate.DestroyWindowTreeHost(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace mus | 122 } // namespace mus |
| 123 } // namespace ash | 123 } // namespace ash |
| OLD | NEW |