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

Unified Diff: ui/base/material_design/material_design_controller_unittest.cc

Issue 2001093002: Revert of Remove enable_topchrome_md build flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/material_design/material_design_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/base/material_design/material_design_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698