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

Unified Diff: net/proxy/proxy_config_unittest.cc

Issue 115029: Making command-line specified proxy settings more flexible - allowing for set... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_config_service_linux.cc ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_unittest.cc
===================================================================
--- net/proxy/proxy_config_unittest.cc (revision 15852)
+++ net/proxy/proxy_config_unittest.cc (working copy)
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "net/proxy/proxy_config.h"
+#include "net/proxy/proxy_config_service_common_unittest.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -197,3 +198,36 @@
config.proxy_rules.proxy_for_ftp);
}
}
+
+TEST(ProxyConfigTest, ParseProxyBypassList) {
+ struct bypass_test {
+ const char* proxy_bypass_input;
+ const char* flattened_output;
+ };
+
+ const struct {
+ const char* proxy_bypass_input;
+ const char* flattened_output;
+ } tests[] = {
+ {
+ "*",
+ "*\n"
+ },
+ {
+ ".google.com, .foo.com:42",
+ "*.google.com\n*.foo.com:42\n"
+ },
+ {
+ ".google.com, foo.com:99, 1.2.3.4:22, 127.0.0.1/8",
+ "*.google.com\n*foo.com:99\n1.2.3.4:22\n127.0.0.1/8\n"
+ }
+ };
+
+ net::ProxyConfig config;
+
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
+ config.ParseNoProxyList(tests[i].proxy_bypass_input);
+ EXPECT_EQ(tests[i].flattened_output,
+ net::FlattenProxyBypass(config.proxy_bypass));
+ }
+}
« no previous file with comments | « net/proxy/proxy_config_service_linux.cc ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698