| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/quic/quic_stream_factory.h" | 5 #include "net/quic/quic_stream_factory.h" |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "net/base/test_data_directory.h" | 9 #include "net/base/test_data_directory.h" |
| 10 #include "net/cert/cert_verifier.h" | 10 #include "net/cert/cert_verifier.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 protected: | 86 protected: |
| 87 QuicStreamFactoryTest() | 87 QuicStreamFactoryTest() |
| 88 : random_generator_(0), | 88 : random_generator_(0), |
| 89 maker_(GetParam(), 0), | 89 maker_(GetParam(), 0), |
| 90 clock_(new MockClock()), | 90 clock_(new MockClock()), |
| 91 cert_verifier_(CertVerifier::CreateDefault()), | 91 cert_verifier_(CertVerifier::CreateDefault()), |
| 92 factory_(&host_resolver_, &socket_factory_, | 92 factory_(&host_resolver_, &socket_factory_, |
| 93 base::WeakPtr<HttpServerProperties>(), cert_verifier_.get(), | 93 base::WeakPtr<HttpServerProperties>(), cert_verifier_.get(), |
| 94 &crypto_client_stream_factory_, &random_generator_, clock_, | 94 &crypto_client_stream_factory_, &random_generator_, clock_, |
| 95 kDefaultMaxPacketSize, std::string(), | 95 kDefaultMaxPacketSize, std::string(), |
| 96 SupportedVersions(GetParam()), true, true, true), | 96 SupportedVersions(GetParam()), true, true, true, |
| 97 QuicTagVector()), |
| 97 host_port_pair_(kDefaultServerHostName, kDefaultServerPort), | 98 host_port_pair_(kDefaultServerHostName, kDefaultServerPort), |
| 98 is_https_(false), | 99 is_https_(false), |
| 99 privacy_mode_(PRIVACY_MODE_DISABLED) { | 100 privacy_mode_(PRIVACY_MODE_DISABLED) { |
| 100 factory_.set_require_confirmation(false); | 101 factory_.set_require_confirmation(false); |
| 101 } | 102 } |
| 102 | 103 |
| 103 scoped_ptr<QuicHttpStream> CreateIfSessionExists( | 104 scoped_ptr<QuicHttpStream> CreateIfSessionExists( |
| 104 const HostPortPair& host_port_pair, | 105 const HostPortPair& host_port_pair, |
| 105 const BoundNetLog& net_log) { | 106 const BoundNetLog& net_log) { |
| 106 return QuicStreamFactoryPeer::CreateIfSessionExists( | 107 return QuicStreamFactoryPeer::CreateIfSessionExists( |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 QuicCryptoClientConfig::CachedState* cached2 = | 1140 QuicCryptoClientConfig::CachedState* cached2 = |
| 1140 crypto_config->LookupOrCreate(server_id2); | 1141 crypto_config->LookupOrCreate(server_id2); |
| 1141 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); | 1142 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); |
| 1142 EXPECT_TRUE(cached2->source_address_token().empty()); | 1143 EXPECT_TRUE(cached2->source_address_token().empty()); |
| 1143 EXPECT_FALSE(cached2->proof_valid()); | 1144 EXPECT_FALSE(cached2->proof_valid()); |
| 1144 } | 1145 } |
| 1145 } | 1146 } |
| 1146 | 1147 |
| 1147 } // namespace test | 1148 } // namespace test |
| 1148 } // namespace net | 1149 } // namespace net |
| OLD | NEW |