Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: ash/common/test/ash_test.cc

Issue 2374893002: Adds AshTest (Closed)
Patch Set: cleanup Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // 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.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/common/test/ash_test.h"
6
7 #include "ash/common/test/ash_test_impl.h"
8 #include "ash/common/wm_window.h"
9 #include "ui/display/display.h"
10
11 namespace ash {
12
13 WindowOwner::WindowOwner(WmWindow* window) : window_(window) {}
14
15 WindowOwner::~WindowOwner() {
16 window_->Destroy();
17 }
18
19 AshTest::AshTest() : test_impl_(AshTestImpl::Create()) {}
20
21 AshTest::~AshTest() {}
22
23 bool AshTest::SupportsMultipleDisplays() const {
24 return test_impl_->SupportsMultipleDisplays();
25 }
26
27 void AshTest::UpdateDisplay(const std::string& display_spec) {
28 return test_impl_->UpdateDisplay(display_spec);
29 }
30
31 std::unique_ptr<WindowOwner> AshTest::CreateTestWindow(const gfx::Rect& bounds,
32 ui::wm::WindowType type,
33 int shell_window_id) {
34 return test_impl_->CreateTestWindow(bounds, type, shell_window_id);
35 }
36
37 display::Display AshTest::GetSecondaryDisplay() {
38 return test_impl_->GetSecondaryDisplay();
39 }
40
41 bool AshTest::SetSecondaryDisplayPlacement(
42 display::DisplayPlacement::Position position,
43 int offset) {
44 return test_impl_->SetSecondaryDisplayPlacement(position, offset);
45 }
46
47 void AshTest::ConfigureWidgetInitParamsForDisplay(
48 WmWindow* window,
49 views::Widget::InitParams* init_params) {
50 test_impl_->ConfigureWidgetInitParamsForDisplay(window, init_params);
51 }
52
53 void AshTest::SetUp() {
54 test_impl_->SetUp();
55 }
56
57 void AshTest::TearDown() {
58 test_impl_->TearDown();
59 }
60
61 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698