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

Unified Diff: chrome/browser/about_flags_unittest.cc

Issue 7841022: Revert 99883 - Completely disable about:flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | « chrome/browser/about_flags.cc ('k') | chrome/browser/autocomplete/builtin_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/about_flags_unittest.cc
===================================================================
--- chrome/browser/about_flags_unittest.cc (revision 99886)
+++ chrome/browser/about_flags_unittest.cc (working copy)
@@ -183,8 +183,7 @@
ConvertFlagsToSwitches(&prefs_, &command_line);
EXPECT_TRUE(command_line.HasSwitch("foo"));
- // TODO(thakis): Undo
- EXPECT_FALSE(command_line.HasSwitch(kSwitch1));
+ EXPECT_TRUE(command_line.HasSwitch(kSwitch1));
}
TEST_F(AboutFlagsTest, RemoveFlagSwitches) {
@@ -229,8 +228,7 @@
// Convert the flags to switches. Experiment 3 shouldn't be among the switches
// as it is not applicable to the current platform.
ConvertFlagsToSwitches(&prefs_, &command_line);
- // TODO(thakis): undo.
- EXPECT_FALSE(command_line.HasSwitch(kSwitch1));
+ EXPECT_TRUE(command_line.HasSwitch(kSwitch1));
EXPECT_FALSE(command_line.HasSwitch(kSwitch3));
// Experiment 3 should show still be persisted in preferences though.
@@ -246,18 +244,15 @@
SetExperimentEnabled(&prefs_, kFlags1, true);
SetExperimentEnabled(&prefs_, kFlags2, true);
CommandLine command_line(CommandLine::NO_PROGRAM);
- // TODO(thakis): undo.
EXPECT_FALSE(command_line.HasSwitch(kSwitch1));
EXPECT_FALSE(command_line.HasSwitch(kSwitch2));
// Convert the flags to switches.
ConvertFlagsToSwitches(&prefs_, &command_line);
- EXPECT_FALSE(command_line.HasSwitch(kSwitch1));
+ EXPECT_TRUE(command_line.HasSwitch(kSwitch1));
EXPECT_EQ(std::string(""), command_line.GetSwitchValueASCII(kSwitch1));
- // TODO(thakis): undo.
- EXPECT_FALSE(command_line.HasSwitch(kSwitch2));
- // TODO(thakis): undo.
- EXPECT_EQ("",
+ EXPECT_TRUE(command_line.HasSwitch(kSwitch2));
+ EXPECT_EQ(std::string(kValueForSwitch2),
command_line.GetSwitchValueASCII(kSwitch2));
// Confirm that there is no '=' in the command line for simple switches.
@@ -278,13 +273,11 @@
std::string(kSwitch2) +
std::string("=");
#if defined(OS_WIN)
- // TODO(thakis): undo.
- EXPECT_EQ(std::wstring::npos,
+ EXPECT_NE(std::wstring::npos,
command_line.GetCommandLineString().find(
ASCIIToWide(switch2_with_equals)));
#else
- // TODO(thakis): undo.
- EXPECT_EQ(std::string::npos,
+ EXPECT_NE(std::string::npos,
command_line.GetCommandLineString().find(switch2_with_equals));
#endif
@@ -313,10 +306,8 @@
CommandLine command_line(CommandLine::NO_PROGRAM);
ConvertFlagsToSwitches(&prefs_, &command_line);
EXPECT_FALSE(command_line.HasSwitch(kMultiSwitch1));
- // TODO(thakis): undo.
- EXPECT_FALSE(command_line.HasSwitch(kMultiSwitch2));
- // TODO(thakis): undo.
- EXPECT_EQ("",
+ EXPECT_TRUE(command_line.HasSwitch(kMultiSwitch2));
+ EXPECT_EQ(std::string(kValueForMultiSwitch2),
command_line.GetSwitchValueASCII(kMultiSwitch2));
}
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/autocomplete/builtin_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698