Index: chrome/browser/prefs/command_line_pref_store_unittest.cc |
diff --git a/chrome/browser/prefs/command_line_pref_store_unittest.cc b/chrome/browser/prefs/command_line_pref_store_unittest.cc |
index 031a7c9cba96b8967ae6b24499f57bf5d4e84078..55d6c52d3114853024d8fa322c7c24b394920867 100644 |
--- a/chrome/browser/prefs/command_line_pref_store_unittest.cc |
+++ b/chrome/browser/prefs/command_line_pref_store_unittest.cc |
@@ -8,6 +8,7 @@ |
#include "base/command_line.h" |
#include "base/string_util.h" |
#include "base/values.h" |
+#include "chrome/browser/net/pref_proxy_config_service.h" |
#include "chrome/browser/prefs/command_line_pref_store.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
@@ -50,10 +51,11 @@ TEST(CommandLinePrefStoreTest, SimpleBooleanPref) { |
CommandLinePrefStore store(&cl); |
Value* actual = NULL; |
- ASSERT_EQ(PrefStore::READ_OK, store.GetValue(prefs::kNoProxyServer, &actual)); |
- bool result; |
- EXPECT_TRUE(actual->GetAsBoolean(&result)); |
- EXPECT_TRUE(result); |
+ ASSERT_EQ(PrefStore::READ_OK, |
+ store.GetValue(prefs::kProxyServerMode, &actual)); |
+ int result = -1; |
+ EXPECT_TRUE(actual->GetAsInteger(&result)); |
+ EXPECT_EQ(PrefProxyConfigService::DISABLED, result); |
} |
// Tests a command line with no recognized prefs. |
@@ -81,10 +83,10 @@ TEST(CommandLinePrefStoreTest, MultipleSwitches) { |
Value* actual = NULL; |
EXPECT_EQ(PrefStore::READ_NO_VALUE, store.GetValue(unknown_bool, &actual)); |
ASSERT_EQ(PrefStore::READ_OK, |
- store.GetValue(prefs::kProxyAutoDetect, &actual)); |
- bool bool_result = false; |
- EXPECT_TRUE(actual->GetAsBoolean(&bool_result)); |
- EXPECT_TRUE(bool_result); |
+ store.GetValue(prefs::kProxyServerMode, &actual)); |
+ int int_result = -1; |
+ EXPECT_TRUE(actual->GetAsInteger(&int_result)); |
+ EXPECT_EQ(PrefProxyConfigService::AUTO_DETECT, int_result); |
danno
2010/12/14 12:48:17
You should also have a test for MANUAL, I don't se
gfeher
2010/12/16 10:42:04
Done.
|
EXPECT_EQ(PrefStore::READ_NO_VALUE, store.GetValue(unknown_string, &actual)); |
std::string string_result = ""; |