| Index: chrome/browser/policy/configuration_policy_pref_store_unittest.cc
|
| diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
|
| index 80c69e451355ed36f9ae9ab6a97bc34ac5813d86..cb7fdf6c65327c27b0b632d9a6bcc8f76e1c683f 100644
|
| --- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
|
| +++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include <gtest/gtest.h>
|
|
|
| #include "base/file_path.h"
|
| +#include "chrome/browser/net/pref_proxy_config_service.h"
|
| #include "chrome/browser/policy/configuration_policy_pref_store.h"
|
| #include "chrome/browser/policy/mock_configuration_policy_provider.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -248,11 +249,9 @@ TEST_F(ConfigurationPolicyPrefStoreProxyTest, ManualOptions) {
|
| EXPECT_EQ("http://short.org/proxy.pac", string_result);
|
| EXPECT_TRUE(store.prefs()->GetString(prefs::kProxyServer, &string_result));
|
| EXPECT_EQ("chromium.org", string_result);
|
| - bool bool_result;
|
| - EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kNoProxyServer, &bool_result));
|
| - EXPECT_FALSE(bool_result);
|
| - EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kProxyAutoDetect, &bool_result));
|
| - EXPECT_FALSE(bool_result);
|
| + int int_result = -1;
|
| + EXPECT_TRUE(store.prefs()->GetInteger(prefs::kProxyServerMode, &int_result));
|
| + EXPECT_EQ(PrefProxyConfigService::MANUAL, int_result);
|
| }
|
|
|
| TEST_F(ConfigurationPolicyPrefStoreProxyTest, NoProxy) {
|
| @@ -271,11 +270,9 @@ TEST_F(ConfigurationPolicyPrefStoreProxyTest, NoProxy) {
|
| &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyPacUrl, &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyServer, &string_result));
|
| - bool bool_result;
|
| - EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kNoProxyServer, &bool_result));
|
| - EXPECT_TRUE(bool_result);
|
| - EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kProxyAutoDetect, &bool_result));
|
| - EXPECT_FALSE(bool_result);
|
| + int int_result = -1;
|
| + EXPECT_TRUE(store.prefs()->GetInteger(prefs::kProxyServerMode, &int_result));
|
| + EXPECT_EQ(PrefProxyConfigService::DISABLED, int_result);
|
| }
|
|
|
| TEST_F(ConfigurationPolicyPrefStoreProxyTest, NoProxyReversedApplyOrder) {
|
| @@ -294,11 +291,9 @@ TEST_F(ConfigurationPolicyPrefStoreProxyTest, NoProxyReversedApplyOrder) {
|
| &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyPacUrl, &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyServer, &string_result));
|
| - bool bool_result;
|
| - EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kNoProxyServer, &bool_result));
|
| - EXPECT_TRUE(bool_result);
|
| - EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kProxyAutoDetect, &bool_result));
|
| - EXPECT_FALSE(bool_result);
|
| + int int_result = -1;
|
| + EXPECT_TRUE(store.prefs()->GetInteger(prefs::kProxyServerMode, &int_result));
|
| + EXPECT_EQ(PrefProxyConfigService::DISABLED, int_result);
|
| }
|
|
|
| TEST_F(ConfigurationPolicyPrefStoreProxyTest, AutoDetect) {
|
| @@ -315,11 +310,9 @@ TEST_F(ConfigurationPolicyPrefStoreProxyTest, AutoDetect) {
|
| &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyPacUrl, &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyServer, &string_result));
|
| - bool bool_result;
|
| - EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kNoProxyServer, &bool_result));
|
| - EXPECT_FALSE(bool_result);
|
| - EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kProxyAutoDetect, &bool_result));
|
| - EXPECT_TRUE(bool_result);
|
| + int int_result = -1;
|
| + EXPECT_TRUE(store.prefs()->GetInteger(prefs::kProxyServerMode, &int_result));
|
| + EXPECT_EQ(PrefProxyConfigService::AUTO_DETECT, int_result);
|
| }
|
|
|
| TEST_F(ConfigurationPolicyPrefStoreProxyTest, UseSystem) {
|
| @@ -338,10 +331,9 @@ TEST_F(ConfigurationPolicyPrefStoreProxyTest, UseSystem) {
|
| &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyPacUrl, &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyServer, &string_result));
|
| - bool bool_result;
|
| - EXPECT_FALSE(store.prefs()->GetBoolean(prefs::kNoProxyServer, &bool_result));
|
| - EXPECT_FALSE(store.prefs()->GetBoolean(prefs::kProxyAutoDetect,
|
| - &bool_result));
|
| + int int_result = -1;
|
| + EXPECT_TRUE(store.prefs()->GetInteger(prefs::kProxyServerMode, &int_result));
|
| + EXPECT_EQ(PrefProxyConfigService::SYSTEM, int_result);
|
| }
|
|
|
| TEST_F(ConfigurationPolicyPrefStoreProxyTest, UseSystemReversedApplyOrder) {
|
| @@ -360,10 +352,9 @@ TEST_F(ConfigurationPolicyPrefStoreProxyTest, UseSystemReversedApplyOrder) {
|
| &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyPacUrl, &string_result));
|
| EXPECT_FALSE(store.prefs()->GetString(prefs::kProxyServer, &string_result));
|
| - bool bool_result;
|
| - EXPECT_FALSE(store.prefs()->GetBoolean(prefs::kNoProxyServer, &bool_result));
|
| - EXPECT_FALSE(store.prefs()->GetBoolean(prefs::kProxyAutoDetect,
|
| - &bool_result));
|
| + int int_result = -1;
|
| + EXPECT_TRUE(store.prefs()->GetInteger(prefs::kProxyServerMode, &int_result));
|
| + EXPECT_EQ(PrefProxyConfigService::SYSTEM, int_result);
|
| }
|
|
|
| class ConfigurationPolicyPrefStoreDefaultSearchTest : public testing::Test {
|
|
|