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

Unified Diff: chrome/browser/about_flags_unittest.cc

Issue 16770002: Restart Chrome if per session flags have been specified on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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
Index: chrome/browser/about_flags_unittest.cc
diff --git a/chrome/browser/about_flags_unittest.cc b/chrome/browser/about_flags_unittest.cc
index 4251cffcec57e5c6dead1f20961b5d0a279441f2..b9b68f505178c727977c62e9dacb5f78290b9fce 100644
--- a/chrome/browser/about_flags_unittest.cc
+++ b/chrome/browser/about_flags_unittest.cc
@@ -221,6 +221,24 @@ TEST_F(AboutFlagsTest, ConvertFlagsToSwitches) {
EXPECT_TRUE(command_line.HasSwitch(kSwitch1));
}
+TEST_F(AboutFlagsTest, CompareSwitchesToCurrentCommandLine) {
+ SetExperimentEnabled(&prefs_, kFlags1, true);
+
+ CommandLine command_line(CommandLine::NO_PROGRAM);
+ command_line.AppendSwitch("foo");
+
+ CommandLine new_command_line(CommandLine::NO_PROGRAM);
+ ConvertFlagsToSwitches(&prefs_, &new_command_line);
+
+ EXPECT_FALSE(CompareSwitchesToCurrentCommandLine(new_command_line,
+ command_line));
+
+ ConvertFlagsToSwitches(&prefs_, &command_line);
+
+ EXPECT_TRUE(CompareSwitchesToCurrentCommandLine(new_command_line,
+ command_line));
+}
+
TEST_F(AboutFlagsTest, RemoveFlagSwitches) {
std::map<std::string, CommandLine::StringType> switch_list;
switch_list[kSwitch1] = CommandLine::StringType();

Powered by Google App Engine
This is Rietveld 408576698