| 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 "ui/views/mus/views_mus_test_suite.h" | 5 #include "ui/views/mus/views_mus_test_suite.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 DISALLOW_COPY_AND_ASSIGN(ShellConnection); | 153 DISALLOW_COPY_AND_ASSIGN(ShellConnection); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 ViewsMusTestSuite::ViewsMusTestSuite(int argc, char** argv) | 156 ViewsMusTestSuite::ViewsMusTestSuite(int argc, char** argv) |
| 157 : ViewsTestSuite(argc, argv) {} | 157 : ViewsTestSuite(argc, argv) {} |
| 158 | 158 |
| 159 ViewsMusTestSuite::~ViewsMusTestSuite() {} | 159 ViewsMusTestSuite::~ViewsMusTestSuite() {} |
| 160 | 160 |
| 161 void ViewsMusTestSuite::Initialize() { | 161 void ViewsMusTestSuite::Initialize() { |
| 162 PlatformTestHelper::SetIsMus(); | 162 PlatformTestHelper::SetIsMus(); |
| 163 // Let other mojo apps know that we're running in tests. Do this with a | 163 // Let other services know that we're running in tests. Do this with a |
| 164 // command line flag to avoid making blocking calls to other processes for | 164 // command line flag to avoid making blocking calls to other processes for |
| 165 // setup for tests (e.g. to unlock the screen in the window manager). | 165 // setup for tests (e.g. to unlock the screen in the window manager). |
| 166 EnsureCommandLineSwitch(ui::switches::kUseTestConfig); | 166 EnsureCommandLineSwitch(ui::switches::kUseTestConfig); |
| 167 | 167 |
| 168 ViewsTestSuite::Initialize(); | 168 ViewsTestSuite::Initialize(); |
| 169 shell_connections_ = base::MakeUnique<ShellConnection>(); | 169 shell_connections_ = base::MakeUnique<ShellConnection>(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 void ViewsMusTestSuite::Shutdown() { | 172 void ViewsMusTestSuite::Shutdown() { |
| 173 shell_connections_.reset(); | 173 shell_connections_.reset(); |
| 174 ViewsTestSuite::Shutdown(); | 174 ViewsTestSuite::Shutdown(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace views | 177 } // namespace views |
| OLD | NEW |