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

Side by Side Diff: ui/base/material_design/material_design_controller_unittest.cc

Issue 1943093002: [Mac][Material Design] Make Material Design the default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable Material Design controller tests. Created 4 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/base/material_design/material_design_controller.h" 10 #include "ui/base/material_design/material_design_controller.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 #if !defined(ENABLE_TOPCHROME_MD) 101 #if !defined(ENABLE_TOPCHROME_MD)
102 102
103 // Verify the Mode maps to Mode::NON_MATERIAL when the compile time flag is not 103 // Verify the Mode maps to Mode::NON_MATERIAL when the compile time flag is not
104 // defined. 104 // defined.
105 TEST_F(MaterialDesignControllerTest, 105 TEST_F(MaterialDesignControllerTest,
106 NonMaterialModeWhenCompileTimeFlagDisabled) { 106 NonMaterialModeWhenCompileTimeFlagDisabled) {
107 EXPECT_EQ(MaterialDesignController::Mode::NON_MATERIAL, 107 EXPECT_EQ(MaterialDesignController::Mode::NON_MATERIAL,
108 MaterialDesignController::GetMode()); 108 MaterialDesignController::GetMode());
109 } 109 }
110 110
111 #elif defined(OS_MACOSX)
112
113 // Verify that MaterialDesignController::IsModeMaterial() is true.
114 TEST_F(MaterialDesignControllerTestMaterial, IsModeMaterialInitializesMode) {
115 EXPECT_TRUE(MaterialDesignController::IsModeMaterial());
tdanderson 2016/05/05 14:56:55 Since OSX does include ENABLE_TOPCHROME_MD I don't
shrike 2016/05/05 16:10:51 Thank you. With your other suggested change the MD
116 }
117
111 #else 118 #else
112 119
113 // Verify command line value "material" maps to Mode::MATERIAL when the compile 120 // Verify command line value "material" maps to Mode::MATERIAL when the compile
114 // time flag is defined. 121 // time flag is defined.
115 TEST_F(MaterialDesignControllerTestMaterial, 122 TEST_F(MaterialDesignControllerTestMaterial,
116 EnabledCommandLineValueMapsToMaterialModeWhenCompileTimeFlagEnabled) { 123 EnabledCommandLineValueMapsToMaterialModeWhenCompileTimeFlagEnabled) {
117 EXPECT_EQ(MaterialDesignController::Mode::MATERIAL_NORMAL, 124 EXPECT_EQ(MaterialDesignController::Mode::MATERIAL_NORMAL,
118 MaterialDesignController::GetMode()); 125 MaterialDesignController::GetMode());
119 } 126 }
120 127
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Verify that MaterialDesignController::IsModeMaterial() will be true when 162 // Verify that MaterialDesignController::IsModeMaterial() will be true when
156 // initialized with command line flag "material". 163 // initialized with command line flag "material".
157 TEST_F(MaterialDesignControllerTestMaterial, IsModeMaterialInitializesMode) { 164 TEST_F(MaterialDesignControllerTestMaterial, IsModeMaterialInitializesMode) {
158 EXPECT_TRUE(MaterialDesignController::IsModeMaterial()); 165 EXPECT_TRUE(MaterialDesignController::IsModeMaterial());
159 } 166 }
160 167
161 #endif // !defined(ENABLE_TOPCHROME_MD) 168 #endif // !defined(ENABLE_TOPCHROME_MD)
162 169
163 } // namespace 170 } // namespace
164 } // namespace ui 171 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698