Index: net/proxy/proxy_bypass_rules_unittest.cc |
diff --git a/net/proxy/proxy_bypass_rules_unittest.cc b/net/proxy/proxy_bypass_rules_unittest.cc |
index 40758fd4ad7073c66482e11ba576e3d1f9eb9e21..7eeeaf6e38caec8b7059a55123129a96c28e1c65 100644 |
--- a/net/proxy/proxy_bypass_rules_unittest.cc |
+++ b/net/proxy/proxy_bypass_rules_unittest.cc |
@@ -243,41 +243,41 @@ TEST(ProxyBypassRulesTest, BypassLocalNames) { |
const char* url; |
bool expected_is_local; |
} tests[] = { |
- // Single-component hostnames are considered local. |
- {"http://localhost/x", true}, |
- {"http://www", true}, |
- |
- // IPv4 loopback interface. |
- {"http://127.0.0.1/x", true}, |
- {"http://127.0.0.1:80/x", true}, |
- |
- // IPv6 loopback interface. |
- {"http://[::1]:80/x", true}, |
- {"http://[0:0::1]:6233/x", true}, |
- {"http://[0:0:0:0:0:0:0:1]/x", true}, |
- |
- // Non-local URLs. |
- {"http://foo.com/", false}, |
- {"http://localhost.i/", false}, |
- {"http://www.google.com/", false}, |
- {"http://192.168.0.1/", false}, |
- |
- // Try with different protocols. |
- {"ftp://127.0.0.1/x", true}, |
- {"ftp://foobar.com/x", false}, |
- |
- // This is a bit of a gray-area, but GURL does not strip trailing dots |
- // in host-names, so the following are considered non-local. |
- {"http://www./x", false}, |
- {"http://localhost./x", false}, |
- }; |
+ // Single-component hostnames are considered local. |
+ {"http://localhost/x", true}, |
+ {"http://www", true}, |
+ |
+ // IPv4 loopback interface. |
+ {"http://127.0.0.1/x", true}, |
+ {"http://127.0.0.1:80/x", true}, |
+ |
+ // IPv6 loopback interface. |
+ {"http://[::1]:80/x", true}, |
+ {"http://[0:0::1]:6233/x", true}, |
+ {"http://[0:0:0:0:0:0:0:1]/x", true}, |
+ |
+ // Non-local URLs. |
+ {"http://foo.com/", false}, |
+ {"http://localhost.i/", false}, |
+ {"http://www.google.com/", false}, |
+ {"http://192.168.0.1/", false}, |
+ |
+ // Try with different protocols. |
+ {"ftp://127.0.0.1/x", true}, |
+ {"ftp://foobar.com/x", false}, |
+ |
+ // This is a bit of a gray-area, but GURL does not strip trailing dots |
+ // in host-names, so the following are considered non-local. |
+ {"http://www./x", false}, |
+ {"http://localhost./x", false}, |
+ }; |
ProxyBypassRules rules; |
rules.ParseFromString("<local>"); |
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { |
- SCOPED_TRACE(base::StringPrintf( |
- "Test[%d]: %s", static_cast<int>(i), tests[i].url)); |
+ SCOPED_TRACE( |
+ base::StringPrintf("Test[%d]: %s", static_cast<int>(i), tests[i].url)); |
EXPECT_EQ(tests[i].expected_is_local, rules.Matches(GURL(tests[i].url))); |
} |
} |