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

Unified Diff: chrome/browser/about_flags_unittest.cc

Issue 7837006: Completely disable about:flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests pass 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
diff --git a/chrome/browser/about_flags_unittest.cc b/chrome/browser/about_flags_unittest.cc
index bf54c1f5389f1e58a34320ac78fbf74f12092439..6c4dd6fd197020230f81e259c3c87ed2e01ba89a 100644
--- a/chrome/browser/about_flags_unittest.cc
+++ b/chrome/browser/about_flags_unittest.cc
@@ -183,7 +183,8 @@ TEST_F(AboutFlagsTest, ConvertFlagsToSwitches) {
ConvertFlagsToSwitches(&prefs_, &command_line);
EXPECT_TRUE(command_line.HasSwitch("foo"));
- EXPECT_TRUE(command_line.HasSwitch(kSwitch1));
+ // TODO(thakis): Undo
+ EXPECT_FALSE(command_line.HasSwitch(kSwitch1));
}
TEST_F(AboutFlagsTest, RemoveFlagSwitches) {
@@ -228,7 +229,8 @@ TEST_F(AboutFlagsTest, PersistAndPrune) {
// 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);
- EXPECT_TRUE(command_line.HasSwitch(kSwitch1));
+ // TODO(thakis): undo.
+ EXPECT_FALSE(command_line.HasSwitch(kSwitch1));
EXPECT_FALSE(command_line.HasSwitch(kSwitch3));
// Experiment 3 should show still be persisted in preferences though.
@@ -244,15 +246,18 @@ TEST_F(AboutFlagsTest, CheckValues) {
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_TRUE(command_line.HasSwitch(kSwitch1));
+ EXPECT_FALSE(command_line.HasSwitch(kSwitch1));
EXPECT_EQ(std::string(""), command_line.GetSwitchValueASCII(kSwitch1));
- EXPECT_TRUE(command_line.HasSwitch(kSwitch2));
- EXPECT_EQ(std::string(kValueForSwitch2),
+ // TODO(thakis): undo.
+ EXPECT_FALSE(command_line.HasSwitch(kSwitch2));
+ // TODO(thakis): undo.
+ EXPECT_EQ("",
command_line.GetSwitchValueASCII(kSwitch2));
// Confirm that there is no '=' in the command line for simple switches.
@@ -273,11 +278,13 @@ TEST_F(AboutFlagsTest, CheckValues) {
std::string(kSwitch2) +
std::string("=");
#if defined(OS_WIN)
- EXPECT_NE(std::wstring::npos,
+ // TODO(thakis): undo.
+ EXPECT_EQ(std::wstring::npos,
command_line.GetCommandLineString().find(
ASCIIToWide(switch2_with_equals)));
#else
- EXPECT_NE(std::string::npos,
+ // TODO(thakis): undo.
+ EXPECT_EQ(std::string::npos,
command_line.GetCommandLineString().find(switch2_with_equals));
#endif
@@ -306,8 +313,10 @@ TEST_F(AboutFlagsTest, MultiValues) {
CommandLine command_line(CommandLine::NO_PROGRAM);
ConvertFlagsToSwitches(&prefs_, &command_line);
EXPECT_FALSE(command_line.HasSwitch(kMultiSwitch1));
- EXPECT_TRUE(command_line.HasSwitch(kMultiSwitch2));
- EXPECT_EQ(std::string(kValueForMultiSwitch2),
+ // TODO(thakis): undo.
+ EXPECT_FALSE(command_line.HasSwitch(kMultiSwitch2));
+ // TODO(thakis): undo.
+ EXPECT_EQ("",
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