| Index: mash/wm/root_window_controller.cc
|
| diff --git a/mash/wm/root_window_controller.cc b/mash/wm/root_window_controller.cc
|
| index 8fe32a88fb839dba2d751bddfe503dac080ae2c5..33c276a49bedaf05b55243f9da26d92b8a60ab66 100644
|
| --- a/mash/wm/root_window_controller.cc
|
| +++ b/mash/wm/root_window_controller.cc
|
| @@ -7,7 +7,9 @@
|
| #include <stdint.h>
|
|
|
| #include "base/bind.h"
|
| +#include "base/command_line.h"
|
| #include "components/mus/common/event_matcher_util.h"
|
| +#include "components/mus/common/switches.h"
|
| #include "components/mus/common/util.h"
|
| #include "components/mus/public/cpp/window.h"
|
| #include "components/mus/public/cpp/window_tree_connection.h"
|
| @@ -176,8 +178,12 @@ void RootWindowController::CreateContainer(
|
| layout_managers_[window].reset(new FillLayout(window));
|
|
|
| // User private windows are hidden by default until the window manager learns
|
| - // the lock state, so their contents are never accidentally revealed.
|
| - window->SetVisible(container != mojom::Container::USER_PRIVATE);
|
| + // the lock state, so their contents are never accidentally revealed. Tests,
|
| + // however, usually assume the screen is unlocked.
|
| + const bool is_test = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + mus::switches::kUseTestConfig);
|
| + window->SetVisible(container != mojom::Container::USER_PRIVATE || is_test);
|
| +
|
| mus::Window* parent =
|
| root_->GetChildByLocalId(ContainerToLocalId(parent_container));
|
| parent->AddChild(window);
|
|
|