| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 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/test/ash_md_test_base.h" | |
| 6 | |
| 7 #include "ash/common/shelf/shelf_constants.h" | |
| 8 #include "ash/common/test/material_design_controller_test_api.h" | |
| 9 | |
| 10 namespace ash { | |
| 11 namespace test { | |
| 12 | |
| 13 AshMDTestBase::AshMDTestBase() {} | |
| 14 | |
| 15 AshMDTestBase::~AshMDTestBase() {} | |
| 16 | |
| 17 void AshMDTestBase::SetUp() { | |
| 18 int non_md_shelf_size = 0; | |
| 19 int non_md_auto_hide_shelf_size = 0; | |
| 20 int md_shelf_size = 0; | |
| 21 int md_auto_hide_shelf_size = 0; | |
| 22 | |
| 23 { | |
| 24 test::MaterialDesignControllerTestAPI md_state( | |
| 25 MaterialDesignController::Mode::NON_MATERIAL); | |
| 26 non_md_shelf_size = GetShelfConstant(SHELF_SIZE); | |
| 27 non_md_auto_hide_shelf_size = GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE); | |
| 28 } | |
| 29 | |
| 30 { | |
| 31 test::MaterialDesignControllerTestAPI md_state(GetParam()); | |
| 32 md_shelf_size = GetShelfConstant(SHELF_SIZE); | |
| 33 md_auto_hide_shelf_size = GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE); | |
| 34 } | |
| 35 | |
| 36 md_maximized_window_height_offset_ = non_md_shelf_size - md_shelf_size; | |
| 37 md_auto_hidden_shelf_height_offset_ = | |
| 38 non_md_auto_hide_shelf_size - md_auto_hide_shelf_size; | |
| 39 | |
| 40 set_material_mode(GetParam()); | |
| 41 | |
| 42 AshTestBase::SetUp(); | |
| 43 } | |
| 44 | |
| 45 int AshMDTestBase::GetMdMaximizedWindowHeightOffset() { | |
| 46 return md_maximized_window_height_offset_; | |
| 47 } | |
| 48 | |
| 49 int AshMDTestBase::GetMdAutoHiddenShelfHeightOffset() { | |
| 50 return md_auto_hidden_shelf_height_offset_; | |
| 51 } | |
| 52 | |
| 53 } // namespace test | |
| 54 } // namespace ash | |
| OLD | NEW |