Index: ash/mus/test/ash_test_impl_mus.cc |
diff --git a/ash/mus/test/ash_test_impl_mus.cc b/ash/mus/test/ash_test_impl_mus.cc |
deleted file mode 100644 |
index b9e5f50f8e136d77fc36e0c8513c1120376a4d3b..0000000000000000000000000000000000000000 |
--- a/ash/mus/test/ash_test_impl_mus.cc |
+++ /dev/null |
@@ -1,110 +0,0 @@ |
-// Copyright 2016 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "ash/mus/test/ash_test_impl_mus.h" |
- |
-#include "ash/test/ash_test.h" |
-#include "ash/wm_window.h" |
-#include "base/command_line.h" |
-#include "base/memory/ptr_util.h" |
-#include "services/ui/public/cpp/property_type_converters.h" |
-#include "services/ui/public/interfaces/window_manager.mojom.h" |
-#include "ui/aura/window.h" |
-#include "ui/display/display_switches.h" |
-#include "ui/wm/core/window_util.h" |
- |
-namespace ash { |
-namespace mus { |
-namespace { |
- |
-// WmTestBase is abstract as TestBody() is pure virtual (the various TEST |
-// macros have the implementation). In order to create WmTestBase we have to |
-// subclass with an empty implementation of TestBody(). That's ok as the class |
-// isn't used as a normal test here. |
-class WmTestBaseImpl : public WmTestBase { |
- public: |
- WmTestBaseImpl() {} |
- ~WmTestBaseImpl() override {} |
- |
- // WmTestBase: |
- void TestBody() override {} |
- |
- private: |
- DISALLOW_COPY_AND_ASSIGN(WmTestBaseImpl); |
-}; |
- |
-} // namespace |
- |
-AshTestImplMus::AshTestImplMus() |
- : wm_test_base_(base::MakeUnique<WmTestBaseImpl>()) {} |
- |
-AshTestImplMus::~AshTestImplMus() {} |
- |
-void AshTestImplMus::SetUp() { |
- // This matches what AshTestBase does. |
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
- if (!command_line->HasSwitch(::switches::kHostWindowBounds)) { |
- command_line->AppendSwitchASCII(::switches::kHostWindowBounds, |
- "1+1-800x600"); |
- } |
- |
- wm_test_base_->SetUp(); |
-} |
- |
-void AshTestImplMus::TearDown() { |
- wm_test_base_->TearDown(); |
-} |
- |
-void AshTestImplMus::UpdateDisplay(const std::string& display_spec) { |
- wm_test_base_->UpdateDisplay(display_spec); |
-} |
- |
-std::unique_ptr<WindowOwner> AshTestImplMus::CreateTestWindow( |
- const gfx::Rect& bounds_in_screen, |
- ui::wm::WindowType type, |
- int shell_window_id) { |
- aura::Window* window = |
- wm_test_base_->CreateTestWindow(bounds_in_screen, type); |
- window->set_id(shell_window_id); |
- return base::MakeUnique<WindowOwner>(WmWindow::Get(window)); |
-} |
- |
-std::unique_ptr<WindowOwner> AshTestImplMus::CreateToplevelTestWindow( |
- const gfx::Rect& bounds_in_screen, |
- int shell_window_id) { |
- // For mus CreateTestWindow() creates top level windows (assuming |
- // WINDOW_TYPE_NORMAL). |
- return CreateTestWindow(bounds_in_screen, ui::wm::WINDOW_TYPE_NORMAL, |
- shell_window_id); |
-} |
- |
-display::Display AshTestImplMus::GetSecondaryDisplay() { |
- return wm_test_base_->GetSecondaryDisplay(); |
-} |
- |
-bool AshTestImplMus::SetSecondaryDisplayPlacement( |
- display::DisplayPlacement::Position position, |
- int offset) { |
- NOTIMPLEMENTED(); |
- return false; |
-} |
- |
-void AshTestImplMus::ConfigureWidgetInitParamsForDisplay( |
- WmWindow* window, |
- views::Widget::InitParams* init_params) { |
- init_params->context = WmWindow::GetAuraWindow(window); |
- init_params |
- ->mus_properties[ui::mojom::WindowManager::kDisplayId_InitProperty] = |
- mojo::ConvertTo<std::vector<uint8_t>>( |
- window->GetDisplayNearestWindow().id()); |
-} |
- |
-void AshTestImplMus::AddTransientChild(WmWindow* parent, WmWindow* window) { |
- // TODO(sky): remove this as both classes can share same implementation now. |
- ::wm::AddTransientChild(WmWindow::GetAuraWindow(parent), |
- WmWindow::GetAuraWindow(window)); |
-} |
- |
-} // namespace mus |
-} // namespace ash |