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

Unified Diff: ash/test/ash_md_test_base.cc

Issue 2067223003: Parameterize Ash unittests to pass with material design enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SupportsHostWindowResize() Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698