Index: ui/base/material_design/material_design_controller_unittest.cc |
diff --git a/ui/base/material_design/material_design_controller_unittest.cc b/ui/base/material_design/material_design_controller_unittest.cc |
index b4d913d6760e23fdf46c1bc895fd563104bb9e8d..b86820d89c7174d03ff858e852e7435ed45a9d04 100644 |
--- a/ui/base/material_design/material_design_controller_unittest.cc |
+++ b/ui/base/material_design/material_design_controller_unittest.cc |
@@ -48,8 +48,10 @@ |
void MaterialDesignControllerTest::SetCommandLineSwitch( |
const std::string& value_string) { |
+#if defined(ENABLE_TOPCHROME_MD) |
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
switches::kTopChromeMD, value_string); |
+#endif // defined(ENABLE_TOPCHROME_MD) |
} |
class MaterialDesignControllerTestMaterial : |
@@ -95,6 +97,18 @@ |
private: |
DISALLOW_COPY_AND_ASSIGN(MaterialDesignControllerTestInvalid); |
}; |
+ |
+#if !defined(ENABLE_TOPCHROME_MD) |
+ |
+// Verify the Mode maps to Mode::NON_MATERIAL when the compile time flag is not |
+// defined. |
+TEST_F(MaterialDesignControllerTest, |
+ NonMaterialModeWhenCompileTimeFlagDisabled) { |
+ EXPECT_EQ(MaterialDesignController::Mode::NON_MATERIAL, |
+ MaterialDesignController::GetMode()); |
+} |
+ |
+#else |
// Verify command line value "material" maps to Mode::MATERIAL when the compile |
// time flag is defined. |
@@ -144,5 +158,7 @@ |
EXPECT_TRUE(MaterialDesignController::IsModeMaterial()); |
} |
+#endif // !defined(ENABLE_TOPCHROME_MD) |
+ |
} // namespace |
} // namespace ui |