| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 class QuicStreamFactoryTest : public ::testing::TestWithParam<QuicVersion> { | 72 class QuicStreamFactoryTest : public ::testing::TestWithParam<QuicVersion> { |
| 73 protected: | 73 protected: |
| 74 QuicStreamFactoryTest() | 74 QuicStreamFactoryTest() |
| 75 : random_generator_(0), | 75 : random_generator_(0), |
| 76 maker_(GetParam(), 0), | 76 maker_(GetParam(), 0), |
| 77 clock_(new MockClock()), | 77 clock_(new MockClock()), |
| 78 factory_(&host_resolver_, &socket_factory_, | 78 factory_(&host_resolver_, &socket_factory_, |
| 79 base::WeakPtr<HttpServerProperties>(), | 79 base::WeakPtr<HttpServerProperties>(), |
| 80 &crypto_client_stream_factory_, | 80 &crypto_client_stream_factory_, |
| 81 &random_generator_, clock_, kDefaultMaxPacketSize, | 81 &random_generator_, clock_, kDefaultMaxPacketSize, |
| 82 SupportedVersions(GetParam())), | 82 SupportedVersions(GetParam()), true), |
| 83 host_port_proxy_pair_(HostPortPair(kDefaultServerHostName, | 83 host_port_proxy_pair_(HostPortPair(kDefaultServerHostName, |
| 84 kDefaultServerPort), | 84 kDefaultServerPort), |
| 85 ProxyServer::Direct()), | 85 ProxyServer::Direct()), |
| 86 is_https_(false), | 86 is_https_(false), |
| 87 cert_verifier_(CertVerifier::CreateDefault()) { | 87 cert_verifier_(CertVerifier::CreateDefault()) { |
| 88 factory_.set_require_confirmation(false); | 88 factory_.set_require_confirmation(false); |
| 89 } | 89 } |
| 90 | 90 |
| 91 | 91 |
| 92 int GetSourcePortForNewSession(const HostPortProxyPair& destination) { | 92 int GetSourcePortForNewSession(const HostPortProxyPair& destination) { |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 QuicCryptoClientConfig::CachedState* cached2 = | 872 QuicCryptoClientConfig::CachedState* cached2 = |
| 873 crypto_config2->LookupOrCreate(host_port_proxy_pair2.first.host()); | 873 crypto_config2->LookupOrCreate(host_port_proxy_pair2.first.host()); |
| 874 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); | 874 EXPECT_NE(cached1->source_address_token(), cached2->source_address_token()); |
| 875 EXPECT_TRUE(cached2->source_address_token().empty()); | 875 EXPECT_TRUE(cached2->source_address_token().empty()); |
| 876 EXPECT_FALSE(cached2->proof_valid()); | 876 EXPECT_FALSE(cached2->proof_valid()); |
| 877 } | 877 } |
| 878 } | 878 } |
| 879 | 879 |
| 880 } // namespace test | 880 } // namespace test |
| 881 } // namespace net | 881 } // namespace net |
| OLD | NEW |