| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/cronet/url_request_context_config.h" | 5 #include "components/cronet/url_request_context_config.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "net/cert/cert_verifier.h" | 9 #include "net/cert/cert_verifier.h" |
| 10 #include "net/http/http_network_session.h" | 10 #include "net/http/http_network_session.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Check race_cert_verification. | 104 // Check race_cert_verification. |
| 105 EXPECT_TRUE(params->quic_race_cert_verification); | 105 EXPECT_TRUE(params->quic_race_cert_verification); |
| 106 | 106 |
| 107 // Check AsyncDNS resolver is enabled. | 107 // Check AsyncDNS resolver is enabled. |
| 108 EXPECT_TRUE(context->host_resolver()->GetDnsConfigAsValue()); | 108 EXPECT_TRUE(context->host_resolver()->GetDnsConfigAsValue()); |
| 109 | 109 |
| 110 net::HostResolver::RequestInfo info(net::HostPortPair("abcde", 80)); | 110 net::HostResolver::RequestInfo info(net::HostPortPair("abcde", 80)); |
| 111 net::AddressList addresses; | 111 net::AddressList addresses; |
| 112 EXPECT_EQ(net::OK, context->host_resolver()->ResolveFromCache( | 112 EXPECT_EQ(net::OK, context->host_resolver()->ResolveFromCache( |
| 113 info, &addresses, net::BoundNetLog())); | 113 info, &addresses, net::NetLogWithSource())); |
| 114 } | 114 } |
| 115 | 115 |
| 116 TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) { | 116 TEST(URLRequestContextConfigTest, SetQuicConnectionMigrationOptions) { |
| 117 URLRequestContextConfig config( | 117 URLRequestContextConfig config( |
| 118 // Enable QUIC. | 118 // Enable QUIC. |
| 119 true, | 119 true, |
| 120 // QUIC User Agent ID. | 120 // QUIC User Agent ID. |
| 121 "Default QUIC User Agent ID", | 121 "Default QUIC User Agent ID", |
| 122 // Enable SPDY. | 122 // Enable SPDY. |
| 123 true, | 123 true, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 context->GetNetworkSessionParams(); | 166 context->GetNetworkSessionParams(); |
| 167 | 167 |
| 168 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); | 168 EXPECT_FALSE(params->quic_close_sessions_on_ip_change); |
| 169 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); | 169 EXPECT_TRUE(params->quic_migrate_sessions_on_network_change); |
| 170 EXPECT_TRUE(params->quic_migrate_sessions_early); | 170 EXPECT_TRUE(params->quic_migrate_sessions_early); |
| 171 } | 171 } |
| 172 | 172 |
| 173 // See stale_host_resolver_unittest.cc for test of StaleDNS options. | 173 // See stale_host_resolver_unittest.cc for test of StaleDNS options. |
| 174 | 174 |
| 175 } // namespace cronet | 175 } // namespace cronet |
| OLD | NEW |