Index: net/proxy/proxy_config_service_linux_unittest.cc |
diff --git a/net/proxy/proxy_config_service_linux_unittest.cc b/net/proxy/proxy_config_service_linux_unittest.cc |
index 3005326d478cffa55d74eb6547120c5dd318d0bc..ea84d9c21bd2ba620188780d633f58bcb3ae630d 100644 |
--- a/net/proxy/proxy_config_service_linux_unittest.cc |
+++ b/net/proxy/proxy_config_service_linux_unittest.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -14,9 +14,9 @@ |
#include "base/logging.h" |
#include "base/string_util.h" |
#include "base/stringprintf.h" |
+#include "base/synchronization/waitable_event.h" |
#include "base/task.h" |
#include "base/threading/thread.h" |
-#include "base/synchronization/waitable_event.h" |
#include "net/proxy/proxy_config.h" |
#include "net/proxy/proxy_config_service_common_unittest.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -290,7 +290,8 @@ class SynchConfigGetter { |
static_cast<MessageLoopForIO*>(file_loop)); |
} |
// Synchronously gets the proxy config. |
- bool SyncGetLatestProxyConfig(net::ProxyConfig* config) { |
+ net::ProxyConfigService::ConfigAvailability SyncGetLatestProxyConfig( |
+ net::ProxyConfig* config) { |
io_thread_.message_loop()->PostTask(FROM_HERE, NewRunnableMethod( |
this, &SynchConfigGetter::GetLatestConfigOnIOThread)); |
Wait(); |
@@ -331,7 +332,9 @@ class SynchConfigGetter { |
// The config obtained by |io_thread_| and read back by the main |
// thread. |
net::ProxyConfig proxy_config_; |
- bool get_latest_config_result_; // Return value from GetLatestProxyConfig(). |
+ |
+ // Return value from GetLatestProxyConfig(). |
+ net::ProxyConfigService::ConfigAvailability get_latest_config_result_; |
}; |
DISABLE_RUNNABLE_METHOD_REFCOUNT(SynchConfigGetter); |
@@ -394,12 +397,31 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
// Input. |
GConfValues values; |
- // Expected outputs (fields of the ProxyConfig). |
+ // Expected outputs (availability and fields of ProxyConfig). |
+ ProxyConfigService::ConfigAvailability availability; |
bool auto_detect; |
GURL pac_url; |
ProxyRulesExpectation proxy_rules; |
} tests[] = { |
{ |
+ TEST_DESC("Invalid"), |
+ { // Input. |
+ "", // mode |
+ "", // autoconfig_url |
+ "", "", "", "", // hosts |
+ 0, 0, 0, 0, // ports |
+ FALSE, FALSE, FALSE, // use, same, auth |
+ empty_ignores, // ignore_hosts |
+ }, |
+ |
+ // Expected result. |
+ ProxyConfigService::CONFIG_UNSET, |
+ false, // auto_detect |
+ GURL(), // pac_url |
+ ProxyRulesExpectation::Empty(), |
+ }, |
+ |
+ { |
TEST_DESC("No proxying"), |
{ // Input. |
"none", // mode |
@@ -411,6 +433,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -428,6 +451,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
true, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -445,6 +469,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL("http://wpad/wpad.dat"), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -462,7 +487,8 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
- false, // auto_detect |
+ ProxyConfigService::CONFIG_VALID, |
+ true, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
}, |
@@ -479,6 +505,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -498,6 +525,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -515,6 +543,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -536,6 +565,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -558,6 +588,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -579,6 +610,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -597,6 +629,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
google_ignores, // ignore_hosts |
}, |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -615,11 +648,15 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicGConfTest) { |
ProxyConfig config; |
gconf_getter->values = tests[i].values; |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
- |
- EXPECT_EQ(tests[i].auto_detect, config.auto_detect()); |
- EXPECT_EQ(tests[i].pac_url, config.pac_url()); |
- EXPECT_TRUE(tests[i].proxy_rules.Matches(config.proxy_rules())); |
+ ProxyConfigService::ConfigAvailability availability = |
+ sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(tests[i].availability, availability); |
+ |
+ if (availability == ProxyConfigService::CONFIG_VALID) { |
+ EXPECT_EQ(tests[i].auto_detect, config.auto_detect()); |
+ EXPECT_EQ(tests[i].pac_url, config.pac_url()); |
+ EXPECT_TRUE(tests[i].proxy_rules.Matches(config.proxy_rules())); |
+ } |
} |
} |
@@ -632,7 +669,8 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
// Input. |
EnvVarValues values; |
- // Expected outputs (fields of the ProxyConfig). |
+ // Expected outputs (availability and fields of ProxyConfig). |
+ ProxyConfigService::ConfigAvailability availability; |
bool auto_detect; |
GURL pac_url; |
ProxyRulesExpectation proxy_rules; |
@@ -652,6 +690,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -672,6 +711,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
true, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -692,6 +732,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL("http://wpad/wpad.dat"), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -712,6 +753,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -732,6 +774,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -754,6 +797,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -776,6 +820,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -798,6 +843,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -822,6 +868,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -844,6 +891,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -866,6 +914,7 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
}, |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -887,6 +936,8 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
".google.com, foo.com:99, 1.2.3.4:22, 127.0.0.1/8", // no_proxy |
}, |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Single( |
@@ -905,11 +956,15 @@ TEST_F(ProxyConfigServiceLinuxTest, BasicEnvTest) { |
ProxyConfig config; |
env->values = tests[i].values; |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
- |
- EXPECT_EQ(tests[i].auto_detect, config.auto_detect()); |
- EXPECT_EQ(tests[i].pac_url, config.pac_url()); |
- EXPECT_TRUE(tests[i].proxy_rules.Matches(config.proxy_rules())); |
+ ProxyConfigService::ConfigAvailability availability = |
+ sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(tests[i].availability, availability); |
+ |
+ if (availability == ProxyConfigService::CONFIG_VALID) { |
+ EXPECT_EQ(tests[i].auto_detect, config.auto_detect()); |
+ EXPECT_EQ(tests[i].pac_url, config.pac_url()); |
+ EXPECT_TRUE(tests[i].proxy_rules.Matches(config.proxy_rules())); |
+ } |
} |
} |
@@ -924,14 +979,16 @@ TEST_F(ProxyConfigServiceLinuxTest, GconfNotification) { |
// Start with no proxy. |
gconf_getter->values.mode = "none"; |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(ProxyConfigService::CONFIG_VALID, |
+ sync_config_getter.SyncGetLatestProxyConfig(&config)); |
EXPECT_FALSE(config.auto_detect()); |
// Now set to auto-detect. |
gconf_getter->values.mode = "auto"; |
// Simulate gconf notification callback. |
service->OnCheckProxyConfigSettings(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(ProxyConfigService::CONFIG_VALID, |
+ sync_config_getter.SyncGetLatestProxyConfig(&config)); |
EXPECT_TRUE(config.auto_detect()); |
} |
@@ -952,7 +1009,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
std::string kioslaverc; |
EnvVarValues env_values; |
- // Expected outputs (fields of the ProxyConfig). |
+ // Expected outputs (availability and fields of ProxyConfig). |
+ ProxyConfigService::ConfigAvailability availability; |
bool auto_detect; |
GURL pac_url; |
ProxyRulesExpectation proxy_rules; |
@@ -965,6 +1023,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
{}, // env_values |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -978,6 +1037,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
{}, // env_values |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
true, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -992,6 +1052,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
{}, // env_values |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL("http://wpad/wpad.dat"), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -1006,6 +1067,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
{}, // env_values |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1024,6 +1086,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
{}, // env_values |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1042,6 +1105,7 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
{}, // env_values |
// Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1059,6 +1123,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"NoProxyFor=.google.com\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1076,6 +1142,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"NoProxyFor=.google.com,.kde.org\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1093,6 +1161,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"NoProxyFor=.google.com\nReversedException=true\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerSchemeWithBypassReversed( |
@@ -1110,6 +1180,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"NoProxyFor=google.com,kde.org,<local>\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1127,6 +1199,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"NoProxyFor=.google.com\nReversedException=true \n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerSchemeWithBypassReversed( |
@@ -1144,6 +1218,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"httpProxy=www.google.com\n[Other Section]\nftpProxy=ftp.foo.com\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1160,6 +1236,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"[Proxy Settings]\r\nProxyType=1\r\nhttpProxy=www.google.com\r\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1176,6 +1254,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"[Proxy Settings]\r\n\nProxyType=1\n\r\nhttpProxy=www.google.com\n\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1192,6 +1272,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"[Proxy Settings]\nProxyType[$e]=1\nhttpProxy[$e]=www.google.com\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1209,6 +1291,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"httpsProxy$e]=www.foo.com\nftpProxy=ftp.foo.com\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1226,6 +1310,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
" Proxy Config Script = http:// foo\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL("http:// foo"), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -1239,6 +1325,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
long_line + "httpsProxy=www.foo.com\nhttpProxy=www.google.com\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1256,6 +1344,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
"httpsProxy=https_proxy\nftpProxy=ftp_proxy\nNoProxyFor=no_proxy\n", |
{}, // env_values |
+ // Expected result. |
+ ProxyConfigService::CONFIG_UNSET, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::Empty(), |
@@ -1281,6 +1371,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
".google.com, .kde.org", // no_proxy |
}, |
+ // Expected result. |
+ ProxyConfigService::CONFIG_VALID, |
false, // auto_detect |
GURL(), // pac_url |
ProxyRulesExpectation::PerScheme( |
@@ -1307,11 +1399,15 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEConfigParser) { |
file_util::WriteFile(kioslaverc_, tests[i].kioslaverc.c_str(), |
tests[i].kioslaverc.length()); |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
- |
- EXPECT_EQ(tests[i].auto_detect, config.auto_detect()); |
- EXPECT_EQ(tests[i].pac_url, config.pac_url()); |
- EXPECT_TRUE(tests[i].proxy_rules.Matches(config.proxy_rules())); |
+ ProxyConfigService::ConfigAvailability availability = |
+ sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(tests[i].availability, availability); |
+ |
+ if (availability == ProxyConfigService::CONFIG_VALID) { |
+ EXPECT_EQ(tests[i].auto_detect, config.auto_detect()); |
+ EXPECT_EQ(tests[i].pac_url, config.pac_url()); |
+ EXPECT_TRUE(tests[i].proxy_rules.Matches(config.proxy_rules())); |
+ } |
} |
} |
@@ -1338,7 +1434,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEHomePicker) { |
new ProxyConfigServiceLinux(env)); |
ProxyConfig config; |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(ProxyConfigService::CONFIG_VALID, |
+ sync_config_getter.SyncGetLatestProxyConfig(&config)); |
EXPECT_TRUE(config.auto_detect()); |
EXPECT_EQ(GURL(), config.pac_url()); |
} |
@@ -1357,7 +1454,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEHomePicker) { |
new ProxyConfigServiceLinux(env)); |
ProxyConfig config; |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(ProxyConfigService::CONFIG_VALID, |
+ sync_config_getter.SyncGetLatestProxyConfig(&config)); |
EXPECT_FALSE(config.auto_detect()); |
EXPECT_EQ(slaverc4_pac_url, config.pac_url()); |
} |
@@ -1370,7 +1468,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEHomePicker) { |
new ProxyConfigServiceLinux(env)); |
ProxyConfig config; |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(ProxyConfigService::CONFIG_VALID, |
+ sync_config_getter.SyncGetLatestProxyConfig(&config)); |
EXPECT_TRUE(config.auto_detect()); |
EXPECT_EQ(GURL(), config.pac_url()); |
} |
@@ -1384,7 +1483,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEHomePicker) { |
new ProxyConfigServiceLinux(env)); |
ProxyConfig config; |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(ProxyConfigService::CONFIG_VALID, |
+ sync_config_getter.SyncGetLatestProxyConfig(&config)); |
EXPECT_TRUE(config.auto_detect()); |
EXPECT_EQ(GURL(), config.pac_url()); |
} |
@@ -1401,7 +1501,8 @@ TEST_F(ProxyConfigServiceLinuxTest, KDEHomePicker) { |
new ProxyConfigServiceLinux(env)); |
ProxyConfig config; |
sync_config_getter.SetupAndInitialFetch(); |
- sync_config_getter.SyncGetLatestProxyConfig(&config); |
+ EXPECT_EQ(ProxyConfigService::CONFIG_VALID, |
+ sync_config_getter.SyncGetLatestProxyConfig(&config)); |
EXPECT_TRUE(config.auto_detect()); |
EXPECT_EQ(GURL(), config.pac_url()); |
} |