| Index: ash/mus/test/wm_test_base.cc
|
| diff --git a/ash/mus/test/wm_test_base.cc b/ash/mus/test/wm_test_base.cc
|
| index c45eb6e73457fd27f8e573754940c7f90f90f533..7b0d70a851c659ab6afbdc96cab717ac0f569d02 100644
|
| --- a/ash/mus/test/wm_test_base.cc
|
| +++ b/ash/mus/test/wm_test_base.cc
|
| @@ -94,6 +94,19 @@ display::Display WmTestBase::GetSecondaryDisplay() {
|
| return roots.size() < 2 ? display::Display() : roots[1]->display();
|
| }
|
|
|
| +RootWindowController* WmTestBase::GetPrimaryRootWindowController() {
|
| + std::vector<RootWindowController*> roots =
|
| + test_helper_->GetRootsOrderedByDisplayId();
|
| + DCHECK(!roots.empty());
|
| + return roots[0];
|
| +}
|
| +
|
| +RootWindowController* WmTestBase::GetSecondaryRootWindowController() {
|
| + std::vector<RootWindowController*> roots =
|
| + test_helper_->GetRootsOrderedByDisplayId();
|
| + return roots.size() < 2 ? nullptr : roots[1];
|
| +}
|
| +
|
| ui::Window* WmTestBase::CreateTestWindow(const gfx::Rect& bounds) {
|
| return CreateTestWindow(bounds, ui::wm::WINDOW_TYPE_NORMAL);
|
| }
|
| @@ -135,6 +148,19 @@ ui::Window* WmTestBase::CreateFullscreenTestWindow() {
|
| return window;
|
| }
|
|
|
| +ui::Window* WmTestBase::CreateFullscreenTestWindow(RootWindowController* root) {
|
| + std::map<std::string, std::vector<uint8_t>> properties;
|
| + properties[ui::mojom::WindowManager::kShowState_Property] =
|
| + mojo::ConvertTo<std::vector<uint8_t>>(
|
| + static_cast<int32_t>(ui::mojom::ShowState::FULLSCREEN));
|
| + properties[ui::mojom::WindowManager::kInitialDisplayId_Property] =
|
| + mojo::ConvertTo<std::vector<uint8_t>>(root->display().id());
|
| +
|
| + ui::Window* window = root->window_manager()->NewTopLevelWindow(&properties);
|
| + window->SetVisible(true);
|
| + return window;
|
| +}
|
| +
|
| ui::Window* WmTestBase::CreateChildTestWindow(ui::Window* parent,
|
| const gfx::Rect& bounds) {
|
| std::map<std::string, std::vector<uint8_t>> properties;
|
|
|