| Index: ui/views/mus/views_mus_test_suite.cc
|
| diff --git a/ui/views/mus/views_mus_test_suite.cc b/ui/views/mus/views_mus_test_suite.cc
|
| index 4d5a810b5a41b323e42659510f032eb2e1d803e0..6373735f074f0bf5bce9294404435846fdd0c76e 100644
|
| --- a/ui/views/mus/views_mus_test_suite.cc
|
| +++ b/ui/views/mus/views_mus_test_suite.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/synchronization/waitable_event.h"
|
| #include "base/threading/simple_thread.h"
|
| #include "base/threading/thread.h"
|
| +#include "components/mus/common/switches.h"
|
| #include "services/shell/background/background_shell.h"
|
| #include "services/shell/public/cpp/connector.h"
|
| #include "services/shell/public/cpp/shell_client.h"
|
| @@ -24,6 +25,12 @@
|
| namespace views {
|
| namespace {
|
|
|
| +void EnsureCommandLineSwitch(const std::string& name) {
|
| + base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
|
| + if (!cmd_line->HasSwitch(name))
|
| + cmd_line->AppendSwitch(name);
|
| +}
|
| +
|
| class DefaultShellClient : public shell::ShellClient {
|
| public:
|
| DefaultShellClient() {}
|
| @@ -130,6 +137,11 @@ ViewsMusTestSuite::~ViewsMusTestSuite() {}
|
|
|
| void ViewsMusTestSuite::Initialize() {
|
| PlatformTestHelper::SetIsMus();
|
| + // Let other mojo apps know that we're running in tests. Do this with a
|
| + // command line flag to avoid making blocking calls to other processes for
|
| + // setup for tests (e.g. to unlock the screen in the window manager).
|
| + EnsureCommandLineSwitch(mus::switches::kUseTestConfig);
|
| +
|
| ViewsTestSuite::Initialize();
|
| shell_connections_.reset(new ShellConnection);
|
| }
|
|
|