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

Unified Diff: components/cronet/url_request_context_config_unittest.cc

Issue 1817553002: Add host resolver rules experimental flag for Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete unused definitions, rebase, and fix test Created 4 years, 4 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 | « components/cronet/url_request_context_config.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d0652229141fa6ecc24dff36c46e96b9df07b392..233b41a5408ea065e7d610ced34869a4e54b31cf 100644
--- a/components/cronet/url_request_context_config_unittest.cc
+++ b/components/cronet/url_request_context_config_unittest.cc
@@ -16,7 +16,7 @@
namespace cronet {
-TEST(URLRequestContextConfigTest, SetQuicExperimentalOptions) {
+TEST(URLRequestContextConfigTest, TestExperimentalOptionPassing) {
URLRequestContextConfig config(
// Enable QUIC.
true,
@@ -48,7 +48,9 @@ TEST(URLRequestContextConfigTest, SetQuicExperimentalOptions) {
"\"close_sessions_on_ip_change\":true,"
"\"race_cert_verification\":true,"
"\"connection_options\":\"TIME,TBBR,REJ\"},"
- "\"AsyncDNS\":{\"enable\":true}}",
+ "\"AsyncDNS\":{\"enable\":true},"
+ "\"HostResolverRules\":{\"host_resolver_rules\":"
+ "\"MAP * 127.0.0.1\"}}",
// Data reduction proxy key.
"",
// Data reduction proxy.
@@ -109,6 +111,11 @@ TEST(URLRequestContextConfigTest, SetQuicExperimentalOptions) {
// Check AsyncDNS resolver is enabled.
EXPECT_TRUE(context->host_resolver()->GetDnsConfigAsValue());
+
+ net::HostResolver::RequestInfo info(net::HostPortPair("abcde", 80));
+ net::AddressList addresses;
+ EXPECT_EQ(net::OK, context->host_resolver()->ResolveFromCache(
+ info, &addresses, net::BoundNetLog()));
}
TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) {
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698