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

Side by Side Diff: ash/test/ash_md_test_base.cc

Issue 2692663002: Gut ash::MaterialDesignController, and remove the about:flags entry. (Closed)
Patch Set: yet another rebase Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « ash/test/ash_md_test_base.h ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « ash/test/ash_md_test_base.h ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698