diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 00:20:48 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 00:20:48 +0000 |
commit | ed4ed0fa4e964e416cd3ac65df64bc238f65461c (patch) | |
tree | 83a492355815043301313a6cced9fb96a033c37f /net/proxy/init_proxy_resolver_unittest.cc | |
parent | b07408332337cd6f10b31e87cbed0886e872fa93 (diff) | |
download | chromium_src-ed4ed0fa4e964e416cd3ac65df64bc238f65461c.zip chromium_src-ed4ed0fa4e964e416cd3ac65df64bc238f65461c.tar.gz chromium_src-ed4ed0fa4e964e416cd3ac65df64bc238f65461c.tar.bz2 |
ProxyConfig behaved like a struct, but was defined as a class.
Changed it to be a proper class with hidden implementation variables, setters etc.
Also seized this opportunity to move the bypass list from being a member of ProxyConfig, to being a member of ProxyRules. This is a more correct hiearchy, since the bypass rules only apply to the manual settings. Lastly, this makes it possible to have the manual rules evaluation be a method on ProxyRules, and shift some more code out of proxy_service.
Review URL: http://codereview.chromium.org/651070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39818 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/init_proxy_resolver_unittest.cc')
-rw-r--r-- | net/proxy/init_proxy_resolver_unittest.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/proxy/init_proxy_resolver_unittest.cc b/net/proxy/init_proxy_resolver_unittest.cc index 46b8b79..1ed62e8 100644 --- a/net/proxy/init_proxy_resolver_unittest.cc +++ b/net/proxy/init_proxy_resolver_unittest.cc @@ -167,7 +167,7 @@ TEST(InitProxyResolverTest, CustomPacSucceeds) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_pac_url(GURL("http://custom/proxy.pac")); Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac"); @@ -199,7 +199,7 @@ TEST(InitProxyResolverTest, CustomPacFails1) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_pac_url(GURL("http://custom/proxy.pac")); rules.AddFailDownloadRule("http://custom/proxy.pac"); @@ -227,7 +227,7 @@ TEST(InitProxyResolverTest, CustomPacFails2) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_pac_url(GURL("http://custom/proxy.pac")); rules.AddFailParsingRule("http://custom/proxy.pac"); @@ -243,7 +243,7 @@ TEST(InitProxyResolverTest, HasNullProxyScriptFetcher) { RuleBasedProxyResolver resolver(&rules, true /*expects_pac_bytes*/); ProxyConfig config; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_pac_url(GURL("http://custom/proxy.pac")); TestCompletionCallback callback; InitProxyResolver init(&resolver, NULL); @@ -258,7 +258,7 @@ TEST(InitProxyResolverTest, AutodetectSuccess) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.auto_detect = true; + config.set_auto_detect(true); Rules::Rule rule = rules.AddSuccessRule("http://wpad/wpad.dat"); @@ -275,8 +275,8 @@ TEST(InitProxyResolverTest, AutodetectFailCustomSuccess1) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.auto_detect = true; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_auto_detect(true); + config.set_pac_url(GURL("http://custom/proxy.pac")); rules.AddFailDownloadRule("http://wpad/wpad.dat"); Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac"); @@ -294,8 +294,8 @@ TEST(InitProxyResolverTest, AutodetectFailCustomSuccess2) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.auto_detect = true; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_auto_detect(true); + config.set_pac_url(GURL("http://custom/proxy.pac")); rules.AddFailParsingRule("http://wpad/wpad.dat"); Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac"); @@ -338,8 +338,8 @@ TEST(InitProxyResolverTest, AutodetectFailCustomFails1) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.auto_detect = true; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_auto_detect(true); + config.set_pac_url(GURL("http://custom/proxy.pac")); rules.AddFailDownloadRule("http://wpad/wpad.dat"); rules.AddFailDownloadRule("http://custom/proxy.pac"); @@ -357,8 +357,8 @@ TEST(InitProxyResolverTest, AutodetectFailCustomFails2) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.auto_detect = true; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_auto_detect(true); + config.set_pac_url(GURL("http://custom/proxy.pac")); rules.AddFailDownloadRule("http://wpad/wpad.dat"); rules.AddFailParsingRule("http://custom/proxy.pac"); @@ -378,8 +378,8 @@ TEST(InitProxyResolverTest, AutodetectFailCustomSuccess2_NoFetch) { RuleBasedProxyScriptFetcher fetcher(&rules); ProxyConfig config; - config.auto_detect = true; - config.pac_url = GURL("http://custom/proxy.pac"); + config.set_auto_detect(true); + config.set_pac_url(GURL("http://custom/proxy.pac")); rules.AddFailParsingRule(""); // Autodetect. Rules::Rule rule = rules.AddSuccessRule("http://custom/proxy.pac"); |