Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |