diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 23:25:54 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 23:25:54 +0000 |
commit | 04f1602f0d206098d69fc9751573a64193ca1c11 (patch) | |
tree | c4a2ab16b7b88604a9b02c2fc7231a5e7f73dec1 /net/proxy/proxy_config_unittest.cc | |
parent | 605d3ded8373c29a886d395d8206cb18bbb97f0c (diff) | |
download | chromium_src-04f1602f0d206098d69fc9751573a64193ca1c11.zip chromium_src-04f1602f0d206098d69fc9751573a64193ca1c11.tar.gz chromium_src-04f1602f0d206098d69fc9751573a64193ca1c11.tar.bz2 |
Use GURL::is_valid() in place of !GURL::is_empty() in a condition.
This is to be more consistent with another piece of code which tests is_valid() rather than is_empty(), in case there should be some difference between those.
Review URL: http://codereview.chromium.org/385017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_config_unittest.cc')
-rw-r--r-- | net/proxy/proxy_config_unittest.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/proxy/proxy_config_unittest.cc b/net/proxy/proxy_config_unittest.cc index c72c8c5..259f1fa 100644 --- a/net/proxy/proxy_config_unittest.cc +++ b/net/proxy/proxy_config_unittest.cc @@ -400,6 +400,28 @@ TEST(ProxyConfigTest, ToString) { } } +TEST(ProxyConfigTest, MayRequirePACResolver) { + { + ProxyConfig config; + EXPECT_FALSE(config.MayRequirePACResolver()); + } + { + ProxyConfig config; + config.auto_detect = true; + EXPECT_TRUE(config.MayRequirePACResolver()); + } + { + ProxyConfig config; + config.pac_url = GURL("http://custom/pac.js"); + EXPECT_TRUE(config.MayRequirePACResolver()); + } + { + ProxyConfig config; + config.pac_url = GURL("notvalid"); + EXPECT_FALSE(config.MayRequirePACResolver()); + } +} + } // namespace } // namespace net |