OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/mus/test/wm_test_helper.h" | 5 #include "ash/mus/test/wm_test_helper.h" |
6 | 6 |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/test/material_design_controller_test_api.h" | 8 #include "ash/common/test/material_design_controller_test_api.h" |
9 #include "ash/mus/root_window_controller.h" | 9 #include "ash/mus/root_window_controller.h" |
10 #include "ash/mus/test/wm_test_screen.h" | 10 #include "ash/mus/test/wm_test_screen.h" |
11 #include "ash/mus/window_manager.h" | 11 #include "ash/mus/window_manager.h" |
12 #include "ash/mus/window_manager_application.h" | 12 #include "ash/mus/window_manager_application.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "services/ui/public/cpp/property_type_converters.h" | 15 #include "services/ui/public/cpp/property_type_converters.h" |
16 #include "services/ui/public/cpp/tests/window_tree_client_private.h" | 16 #include "services/ui/public/cpp/tests/window_tree_client_private.h" |
17 #include "services/ui/public/cpp/window_tree_client.h" | 17 #include "services/ui/public/cpp/window_tree_client.h" |
18 #include "ui/base/material_design/material_design_controller.h" | 18 #include "ui/base/material_design/material_design_controller.h" |
19 #include "ui/base/test/material_design_controller_test_api.h" | 19 #include "ui/base/test/material_design_controller_test_api.h" |
20 #include "ui/display/display.h" | 20 #include "ui/display/display.h" |
21 | 21 |
22 namespace ash { | 22 namespace ash { |
23 namespace mus { | 23 namespace mus { |
24 | 24 |
25 WmTestHelper::WmTestHelper() {} | 25 WmTestHelper::WmTestHelper() {} |
26 | 26 |
27 WmTestHelper::~WmTestHelper() { | 27 WmTestHelper::~WmTestHelper() { |
| 28 window_manager_app_.window_manager_.reset(); |
28 ash::test::MaterialDesignControllerTestAPI::Uninitialize(); | 29 ash::test::MaterialDesignControllerTestAPI::Uninitialize(); |
29 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); | 30 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); |
30 } | 31 } |
31 | 32 |
32 void WmTestHelper::Init() { | 33 void WmTestHelper::Init() { |
33 ui::MaterialDesignController::Initialize(); | 34 ui::MaterialDesignController::Initialize(); |
34 ash::MaterialDesignController::Initialize(); | 35 ash::MaterialDesignController::Initialize(); |
35 | 36 |
36 message_loop_.reset(new base::MessageLoopForUI()); | 37 message_loop_.reset(new base::MessageLoopForUI()); |
37 window_manager_app_.window_manager_.reset(new WindowManager(nullptr)); | 38 window_manager_app_.window_manager_.reset(new WindowManager(nullptr)); |
(...skipping 18 matching lines...) Expand all Loading... |
56 | 57 |
57 screen_->display_list()->AddDisplay(display, | 58 screen_->display_list()->AddDisplay(display, |
58 views::DisplayList::Type::PRIMARY); | 59 views::DisplayList::Type::PRIMARY); |
59 | 60 |
60 ui::WindowTreeClientPrivate(window_tree_client_setup_.window_tree_client()) | 61 ui::WindowTreeClientPrivate(window_tree_client_setup_.window_tree_client()) |
61 .CallWmNewDisplayAdded(display); | 62 .CallWmNewDisplayAdded(display); |
62 } | 63 } |
63 | 64 |
64 } // namespace mus | 65 } // namespace mus |
65 } // namespace ash | 66 } // namespace ash |
OLD | NEW |