OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/proxy_config_service_impl.h" | 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // Expected result. | 197 // Expected result. |
198 false, // auto_detect | 198 false, // auto_detect |
199 GURL(), // pac_url | 199 GURL(), // pac_url |
200 net::ProxyRulesExpectation::Single( // proxy_rules | 200 net::ProxyRulesExpectation::Single( // proxy_rules |
201 "www.google.com:80", // single proxy | 201 "www.google.com:80", // single proxy |
202 // bypass_rules | 202 // bypass_rules |
203 "*.google.com,*foo.com:99,1.2.3.4:22,127.0.0.1/8,<local>"), | 203 "*.google.com,*foo.com:99,1.2.3.4:22,127.0.0.1/8,<local>"), |
204 }, | 204 }, |
205 }; // tests | 205 }; // tests |
206 | 206 |
207 const char* kUserProfilePath = "user_profile"; | 207 const char kUserProfilePath[] = "user_profile"; |
208 | 208 |
209 } // namespace | 209 } // namespace |
210 | 210 |
211 class ProxyConfigServiceImplTest : public testing::Test { | 211 class ProxyConfigServiceImplTest : public testing::Test { |
212 protected: | 212 protected: |
213 ProxyConfigServiceImplTest() | 213 ProxyConfigServiceImplTest() |
214 : ui_thread_(BrowserThread::UI, &loop_), | 214 : ui_thread_(BrowserThread::UI, &loop_), |
215 io_thread_(BrowserThread::IO, &loop_) {} | 215 io_thread_(BrowserThread::IO, &loop_) {} |
216 | 216 |
217 virtual void SetUp() { | 217 virtual void SetUp() { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 pref_service_.RemoveRecommendedPref(prefs::kProxy); | 445 pref_service_.RemoveRecommendedPref(prefs::kProxy); |
446 SyncGetLatestProxyConfig(&actual_config); | 446 SyncGetLatestProxyConfig(&actual_config); |
447 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); | 447 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); |
448 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); | 448 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); |
449 EXPECT_TRUE(network_params.proxy_rules.Matches( | 449 EXPECT_TRUE(network_params.proxy_rules.Matches( |
450 actual_config.proxy_rules())); | 450 actual_config.proxy_rules())); |
451 } | 451 } |
452 } | 452 } |
453 | 453 |
454 } // namespace chromeos | 454 } // namespace chromeos |
OLD | NEW |