OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_TEST_ASH_MD_TEST_BASE_H_ | 5 #ifndef ASH_TEST_ASH_MD_TEST_BASE_H_ |
6 #define ASH_TEST_ASH_MD_TEST_BASE_H_ | 6 #define ASH_TEST_ASH_MD_TEST_BASE_H_ |
7 | 7 |
8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/test/material_design_controller_test_api.h" | 10 #include "ash/test/material_design_controller_test_api.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 namespace test { | 13 namespace test { |
14 | 14 |
15 class AshMDTestBase | 15 class AshMDTestBase |
16 : public AshTestBase, | 16 : public AshTestBase, |
17 public testing::WithParamInterface<ash::MaterialDesignController::Mode> { | 17 public testing::WithParamInterface<ash::MaterialDesignController::Mode> { |
18 public: | 18 public: |
19 AshMDTestBase(); | 19 AshMDTestBase(); |
20 ~AshMDTestBase() override; | 20 ~AshMDTestBase() override; |
21 | 21 |
22 // AshTestBase: | 22 // AshTestBase: |
23 void SetUp() override; | 23 void SetUp() override; |
24 void TearDown() override; | |
25 | 24 |
26 int GetMdMaximizedWindowHeightOffset(); | 25 int GetMdMaximizedWindowHeightOffset(); |
27 int GetMdAutoHiddenShelfHeightOffset(); | 26 int GetMdAutoHiddenShelfHeightOffset(); |
28 | 27 |
29 private: | 28 private: |
30 std::unique_ptr<MaterialDesignControllerTestAPI> material_design_state_; | |
31 | |
32 // The material design shelf is taller (by 1px) so use this offset to | 29 // The material design shelf is taller (by 1px) so use this offset to |
33 // adjust the expected height of a maximized window. | 30 // adjust the expected height of a maximized window. |
34 int md_maximized_window_height_offset_ = 0; | 31 int md_maximized_window_height_offset_ = 0; |
35 | 32 |
36 // The material design auto hidden shelf is shorter (by 3) so use this offset | 33 // The material design auto hidden shelf is shorter (by 3) so use this offset |
37 // to adjust the display/root window size. | 34 // to adjust the display/root window size. |
38 int md_auto_hidden_shelf_height_offset_ = 0; | 35 int md_auto_hidden_shelf_height_offset_ = 0; |
39 | 36 |
40 DISALLOW_COPY_AND_ASSIGN(AshMDTestBase); | 37 DISALLOW_COPY_AND_ASSIGN(AshMDTestBase); |
41 }; | 38 }; |
42 | 39 |
43 } // namespace test | 40 } // namespace test |
44 } // namespace ash | 41 } // namespace ash |
45 | 42 |
46 #endif // ASH_TEST_ASH_MD_TEST_BASE_H_ | 43 #endif // ASH_TEST_ASH_MD_TEST_BASE_H_ |
OLD | NEW |