Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..27805560f6487d87f828fd68697d4c595caf1a98 |
| --- /dev/null |
| +++ b/ash/mus/test/ash_test_impl_mus.cc |
| @@ -0,0 +1,88 @@ |
| +// 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/common/test/ash_test.h" |
| +#include "ash/mus/bridge/wm_window_mus.h" |
| +#include "base/memory/ptr_util.h" |
| +#include "services/ui/public/cpp/property_type_converters.h" |
| +#include "services/ui/public/cpp/window.h" |
| +#include "services/ui/public/cpp/window_property.h" |
| +#include "services/ui/public/interfaces/window_manager.mojom.h" |
| + |
| +namespace ash { |
| +namespace mus { |
| +namespace { |
| + |
| +class WmTestBaseImpl : public WmTestBase { |
|
James Cook
2016/09/28 01:19:42
This is unusual, and testing::Test specifically wa
sky
2016/09/28 17:31:45
Done.
|
| + 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() { |
| + wm_test_base_->SetUp(); |
| +} |
| + |
| +void AshTestImplMus::TearDown() { |
| + wm_test_base_->TearDown(); |
| +} |
| + |
| +bool AshTestImplMus::SupportsMultipleDisplays() const { |
| + return wm_test_base_->SupportsMultipleDisplays(); |
| +} |
| + |
| +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) { |
| + WmWindowMus* window = |
| + WmWindowMus::Get(wm_test_base_->CreateTestWindow(bounds_in_screen, type)); |
| + window->SetShellWindowId(shell_window_id); |
| + return base::MakeUnique<WindowOwner>(window); |
| +} |
| + |
| +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) { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +} // namespace mus |
| + |
| +// static |
| +std::unique_ptr<AshTestImpl> AshTestImpl::Create() { |
| + return base::MakeUnique<mus::AshTestImplMus>(); |
| +} |
| + |
| +} // namespace ash |