Chromium Code Reviews| Index: ash/test/ash_md_test_base.cc |
| diff --git a/ash/test/ash_md_test_base.cc b/ash/test/ash_md_test_base.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..34f5b5272b378a89e12ebae016f58a10f72be753 |
| --- /dev/null |
| +++ b/ash/test/ash_md_test_base.cc |
| @@ -0,0 +1,36 @@ |
| +// 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/test/ash_md_test_base.h" |
| + |
| +#include "ash/common/shelf/shelf_constants.h" |
| +#include "ash/test/material_design_controller_test_api.h" |
| + |
| +namespace ash { |
| +namespace test { |
| + |
| +AshMDTestBase::AshMDTestBase() : md_maximized_window_height_offset_(0) {} |
| + |
| +AshMDTestBase::~AshMDTestBase() {} |
| + |
| +void AshMDTestBase::SetUp() { |
| + AshTestBase::SetUp(); |
| + const int default_shelf_size = GetShelfConstant(SHELF_SIZE); |
| + material_design_state_.reset( |
| + new test::MaterialDesignControllerTestAPI(GetParam())); |
| + const int md_state_shelf_size = GetShelfConstant(SHELF_SIZE); |
| + md_maximized_window_height_offset_ = default_shelf_size - md_state_shelf_size; |
|
James Cook
2016/06/21 22:17:54
Nice.
|
| +} |
| + |
| +void AshMDTestBase::TearDown() { |
| + material_design_state_.reset(); |
| + AshTestBase::TearDown(); |
| +} |
| + |
| +int AshMDTestBase::GetMdMaximizedWindowHeightOffset() { |
| + return md_maximized_window_height_offset_; |
| +} |
| + |
| +} // namespace test |
| +} // namespace ash |