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

Unified Diff: components/cronet/url_request_context_config_unittest.cc

Issue 2711153007: Add Cronet experimental option to disable ipv6 (Closed)
Patch Set: Created 3 years, 10 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
Index: components/cronet/url_request_context_config_unittest.cc
diff --git a/components/cronet/url_request_context_config_unittest.cc b/components/cronet/url_request_context_config_unittest.cc
index b072527ba5605e88ccec9650b3c5e5546c53a351..c46b4e749a14fb70f1eaeadcb4d46ca4c4be4107 100644
--- a/components/cronet/url_request_context_config_unittest.cc
+++ b/components/cronet/url_request_context_config_unittest.cc
@@ -51,7 +51,8 @@ TEST(URLRequestContextConfigTest, TestExperimentalOptionPassing) {
"\"connection_options\":\"TIME,TBBR,REJ\"},"
"\"AsyncDNS\":{\"enable\":true},"
"\"HostResolverRules\":{\"host_resolver_rules\":"
- "\"MAP * 127.0.0.1\"}}",
+ "\"MAP * 127.0.0.1\"},"
+ "\"disable_ipv6\":true}",
xunjieli 2017/02/27 15:37:39 nit: Add a comment before this line and link a crb
mgersh 2017/02/28 18:29:57 Done.
// Data reduction proxy key.
"",
// Data reduction proxy.
@@ -111,6 +112,10 @@ TEST(URLRequestContextConfigTest, TestExperimentalOptionPassing) {
// Check AsyncDNS resolver is enabled.
EXPECT_TRUE(context->host_resolver()->GetDnsConfigAsValue());
+ // Check IPv6 is disabled.
+ EXPECT_EQ(net::ADDRESS_FAMILY_IPV4,
+ context->host_resolver()->GetDefaultAddressFamily());
+
net::HostResolver::RequestInfo info(net::HostPortPair("abcde", 80));
net::AddressList addresses;
EXPECT_EQ(net::OK, context->host_resolver()->ResolveFromCache(

Powered by Google App Engine
This is Rietveld 408576698