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..cb24414ad9b42ef9b0f71858db30f43c6eabdb98 |
--- /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() {} |
+ |
+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; |
+} |
+ |
+void AshMDTestBase::TearDown() { |
+ material_design_state_.reset(); |
+ AshTestBase::TearDown(); |
+} |
+ |
+int AshMDTestBase::GetMdMaximizedWindowHeightOffset() { |
+ return md_maximized_window_height_offset_; |
+} |
+ |
+} // namespace test |
+} // namespace ash |