Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Side by Side Diff: chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc

Issue 12315019: Change ProxyRules to handle ProxyLists rather than just single ProxyServer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/importer/firefox_proxy_settings.cc ('k') | net/proxy/proxy_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/pref_proxy_config_tracker_impl.h" 5 #include "chrome/browser/net/pref_proxy_config_tracker_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 prefs::kProxy, 139 prefs::kProxy,
140 ProxyConfigDictionary::CreateFixedServers("http://example.com:3128", "")); 140 ProxyConfigDictionary::CreateFixedServers("http://example.com:3128", ""));
141 loop_.RunUntilIdle(); 141 loop_.RunUntilIdle();
142 142
143 net::ProxyConfig actual_config; 143 net::ProxyConfig actual_config;
144 EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID, 144 EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID,
145 proxy_config_service_->GetLatestProxyConfig(&actual_config)); 145 proxy_config_service_->GetLatestProxyConfig(&actual_config));
146 EXPECT_FALSE(actual_config.auto_detect()); 146 EXPECT_FALSE(actual_config.auto_detect());
147 EXPECT_EQ(net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY, 147 EXPECT_EQ(net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY,
148 actual_config.proxy_rules().type); 148 actual_config.proxy_rules().type);
149 EXPECT_EQ(actual_config.proxy_rules().single_proxy, 149 EXPECT_EQ(actual_config.proxy_rules().single_proxies.Get(),
150 net::ProxyServer::FromURI("http://example.com:3128", 150 net::ProxyServer::FromURI("http://example.com:3128",
151 net::ProxyServer::SCHEME_HTTP)); 151 net::ProxyServer::SCHEME_HTTP));
152 152
153 pref_service_->SetManagedPref(prefs::kProxy, 153 pref_service_->SetManagedPref(prefs::kProxy,
154 ProxyConfigDictionary::CreateAutoDetect()); 154 ProxyConfigDictionary::CreateAutoDetect());
155 loop_.RunUntilIdle(); 155 loop_.RunUntilIdle();
156 156
157 EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID, 157 EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID,
158 proxy_config_service_->GetLatestProxyConfig(&actual_config)); 158 proxy_config_service_->GetLatestProxyConfig(&actual_config));
159 EXPECT_TRUE(actual_config.auto_detect()); 159 EXPECT_TRUE(actual_config.auto_detect());
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 net::ProxyRulesExpectation::Empty(), 477 net::ProxyRulesExpectation::Empty(),
478 }, 478 },
479 }; 479 };
480 480
481 INSTANTIATE_TEST_CASE_P( 481 INSTANTIATE_TEST_CASE_P(
482 PrefProxyConfigTrackerImplCommandLineTestInstance, 482 PrefProxyConfigTrackerImplCommandLineTestInstance,
483 PrefProxyConfigTrackerImplCommandLineTest, 483 PrefProxyConfigTrackerImplCommandLineTest,
484 testing::ValuesIn(kCommandLineTestParams)); 484 testing::ValuesIn(kCommandLineTestParams));
485 485
486 } // namespace 486 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/importer/firefox_proxy_settings.cc ('k') | net/proxy/proxy_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698