| 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 "net/proxy/proxy_config_service_linux.h" | 5 #include "net/proxy/proxy_config_service_linux.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 {}, // env_values | 1091 {}, // env_values |
| 1092 | 1092 |
| 1093 // Expected result. | 1093 // Expected result. |
| 1094 ProxyConfigService::CONFIG_VALID, | 1094 ProxyConfigService::CONFIG_VALID, |
| 1095 false, // auto_detect | 1095 false, // auto_detect |
| 1096 GURL("http://wpad/wpad.dat"), // pac_url | 1096 GURL("http://wpad/wpad.dat"), // pac_url |
| 1097 ProxyRulesExpectation::Empty(), | 1097 ProxyRulesExpectation::Empty(), |
| 1098 }, | 1098 }, |
| 1099 | 1099 |
| 1100 { | 1100 { |
| 1101 TEST_DESC("Valid PAC file without file://"), |
| 1102 |
| 1103 // Input. |
| 1104 "[Proxy Settings]\nProxyType=2\n" |
| 1105 "Proxy Config Script=/wpad/wpad.dat\n", |
| 1106 {}, // env_values |
| 1107 |
| 1108 // Expected result. |
| 1109 ProxyConfigService::CONFIG_VALID, |
| 1110 false, // auto_detect |
| 1111 GURL("file:///wpad/wpad.dat"), // pac_url |
| 1112 ProxyRulesExpectation::Empty(), |
| 1113 }, |
| 1114 |
| 1115 { |
| 1101 TEST_DESC("Per-scheme proxy rules"), | 1116 TEST_DESC("Per-scheme proxy rules"), |
| 1102 | 1117 |
| 1103 // Input. | 1118 // Input. |
| 1104 "[Proxy Settings]\nProxyType=1\nhttpProxy=www.google.com\n" | 1119 "[Proxy Settings]\nProxyType=1\nhttpProxy=www.google.com\n" |
| 1105 "httpsProxy=www.foo.com\nftpProxy=ftp.foo.com\n", | 1120 "httpsProxy=www.foo.com\nftpProxy=ftp.foo.com\n", |
| 1106 {}, // env_values | 1121 {}, // env_values |
| 1107 | 1122 |
| 1108 // Expected result. | 1123 // Expected result. |
| 1109 ProxyConfigService::CONFIG_VALID, | 1124 ProxyConfigService::CONFIG_VALID, |
| 1110 false, // auto_detect | 1125 false, // auto_detect |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 ProxyConfig config; | 1607 ProxyConfig config; |
| 1593 sync_config_getter.SetupAndInitialFetch(); | 1608 sync_config_getter.SetupAndInitialFetch(); |
| 1594 EXPECT_EQ(ProxyConfigService::CONFIG_VALID, | 1609 EXPECT_EQ(ProxyConfigService::CONFIG_VALID, |
| 1595 sync_config_getter.SyncGetLatestProxyConfig(&config)); | 1610 sync_config_getter.SyncGetLatestProxyConfig(&config)); |
| 1596 EXPECT_TRUE(config.auto_detect()); | 1611 EXPECT_TRUE(config.auto_detect()); |
| 1597 EXPECT_EQ(GURL(), config.pac_url()); | 1612 EXPECT_EQ(GURL(), config.pac_url()); |
| 1598 } | 1613 } |
| 1599 } | 1614 } |
| 1600 | 1615 |
| 1601 } // namespace net | 1616 } // namespace net |
| OLD | NEW |