Chromium Code Reviews| Index: ash/common/test/ash_test.cc |
| diff --git a/ash/common/test/ash_test.cc b/ash/common/test/ash_test.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..219a0519862f5cf04e717498e54bcef8f818def2 |
| --- /dev/null |
| +++ b/ash/common/test/ash_test.cc |
| @@ -0,0 +1,61 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
|
James Cook
2016/09/28 01:19:42
super nit: 2016
sky
2016/09/28 17:31:45
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ash/common/test/ash_test.h" |
| + |
| +#include "ash/common/test/ash_test_impl.h" |
| +#include "ash/common/wm_window.h" |
| +#include "ui/display/display.h" |
| + |
| +namespace ash { |
| + |
| +WindowOwner::WindowOwner(WmWindow* window) : window_(window) {} |
| + |
| +WindowOwner::~WindowOwner() { |
| + window_->Destroy(); |
| +} |
| + |
| +AshTest::AshTest() : test_impl_(AshTestImpl::Create()) {} |
| + |
| +AshTest::~AshTest() {} |
| + |
| +bool AshTest::SupportsMultipleDisplays() const { |
| + return test_impl_->SupportsMultipleDisplays(); |
| +} |
| + |
| +void AshTest::UpdateDisplay(const std::string& display_spec) { |
| + return test_impl_->UpdateDisplay(display_spec); |
| +} |
| + |
| +std::unique_ptr<WindowOwner> AshTest::CreateTestWindow(const gfx::Rect& bounds, |
| + ui::wm::WindowType type, |
| + int shell_window_id) { |
| + return test_impl_->CreateTestWindow(bounds, type, shell_window_id); |
| +} |
| + |
| +display::Display AshTest::GetSecondaryDisplay() { |
| + return test_impl_->GetSecondaryDisplay(); |
| +} |
| + |
| +bool AshTest::SetSecondaryDisplayPlacement( |
| + display::DisplayPlacement::Position position, |
| + int offset) { |
| + return test_impl_->SetSecondaryDisplayPlacement(position, offset); |
| +} |
| + |
| +void AshTest::ConfigureWidgetInitParamsForDisplay( |
| + WmWindow* window, |
| + views::Widget::InitParams* init_params) { |
| + test_impl_->ConfigureWidgetInitParamsForDisplay(window, init_params); |
| +} |
| + |
| +void AshTest::SetUp() { |
| + test_impl_->SetUp(); |
| +} |
| + |
| +void AshTest::TearDown() { |
| + test_impl_->TearDown(); |
| +} |
| + |
| +} // namespace ash |