| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 ViewsMusTestSuite::~ViewsMusTestSuite() {} | 217 ViewsMusTestSuite::~ViewsMusTestSuite() {} |
| 218 | 218 |
| 219 void ViewsMusTestSuite::Initialize() { | 219 void ViewsMusTestSuite::Initialize() { |
| 220 PlatformTestHelper::SetIsMus(); | 220 PlatformTestHelper::SetIsMus(); |
| 221 // Let other services know that we're running in tests. Do this with a | 221 // Let other services know that we're running in tests. Do this with a |
| 222 // command line flag to avoid making blocking calls to other processes for | 222 // command line flag to avoid making blocking calls to other processes for |
| 223 // setup for tests (e.g. to unlock the screen in the window manager). | 223 // setup for tests (e.g. to unlock the screen in the window manager). |
| 224 EnsureCommandLineSwitch(ui::switches::kUseTestConfig); | 224 EnsureCommandLineSwitch(ui::switches::kUseTestConfig); |
| 225 | 225 |
| 226 EnsureCommandLineSwitch(switches::kOverrideUseGLWithOSMesaForTests); | 226 EnsureCommandLineSwitch(switches::kOverrideUseSoftwareGLForTests); |
| 227 | 227 |
| 228 ViewsTestSuite::Initialize(); | 228 ViewsTestSuite::Initialize(); |
| 229 service_manager_connections_ = base::MakeUnique<ServiceManagerConnection>(); | 229 service_manager_connections_ = base::MakeUnique<ServiceManagerConnection>(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void ViewsMusTestSuite::Shutdown() { | 232 void ViewsMusTestSuite::Shutdown() { |
| 233 service_manager_connections_.reset(); | 233 service_manager_connections_.reset(); |
| 234 ViewsTestSuite::Shutdown(); | 234 ViewsTestSuite::Shutdown(); |
| 235 } | 235 } |
| 236 | 236 |
| 237 } // namespace views | 237 } // namespace views |
| OLD | NEW |