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 "base/thread_task_runner_handle.h" |
9 #include "net/base/test_data_directory.h" | 10 #include "net/base/test_data_directory.h" |
10 #include "net/cert/cert_verifier.h" | 11 #include "net/cert/cert_verifier.h" |
11 #include "net/dns/mock_host_resolver.h" | 12 #include "net/dns/mock_host_resolver.h" |
12 #include "net/http/http_response_headers.h" | 13 #include "net/http/http_response_headers.h" |
13 #include "net/http/http_response_info.h" | 14 #include "net/http/http_response_info.h" |
14 #include "net/http/http_util.h" | 15 #include "net/http/http_util.h" |
15 #include "net/http/transport_security_state.h" | 16 #include "net/http/transport_security_state.h" |
16 #include "net/quic/crypto/crypto_handshake.h" | 17 #include "net/quic/crypto/crypto_handshake.h" |
17 #include "net/quic/crypto/proof_verifier_chromium.h" | 18 #include "net/quic/crypto/proof_verifier_chromium.h" |
18 #include "net/quic/crypto/quic_decrypter.h" | 19 #include "net/quic/crypto/quic_decrypter.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 class QuicStreamFactoryTest : public ::testing::TestWithParam<TestParams> { | 195 class QuicStreamFactoryTest : public ::testing::TestWithParam<TestParams> { |
195 protected: | 196 protected: |
196 QuicStreamFactoryTest() | 197 QuicStreamFactoryTest() |
197 : random_generator_(0), | 198 : random_generator_(0), |
198 clock_(new MockClock()), | 199 clock_(new MockClock()), |
199 runner_(new TestTaskRunner(clock_)), | 200 runner_(new TestTaskRunner(clock_)), |
200 maker_(GetParam().version, 0, clock_, kDefaultServerHostName), | 201 maker_(GetParam().version, 0, clock_, kDefaultServerHostName), |
201 cert_verifier_(CertVerifier::CreateDefault()), | 202 cert_verifier_(CertVerifier::CreateDefault()), |
202 channel_id_service_( | 203 channel_id_service_( |
203 new ChannelIDService(new DefaultChannelIDStore(nullptr), | 204 new ChannelIDService(new DefaultChannelIDStore(nullptr), |
204 base::MessageLoopProxy::current())), | 205 base::ThreadTaskRunnerHandle::Get())), |
205 factory_(&host_resolver_, | 206 factory_(&host_resolver_, |
206 &socket_factory_, | 207 &socket_factory_, |
207 base::WeakPtr<HttpServerProperties>(), | 208 base::WeakPtr<HttpServerProperties>(), |
208 cert_verifier_.get(), | 209 cert_verifier_.get(), |
209 channel_id_service_.get(), | 210 channel_id_service_.get(), |
210 &transport_security_state_, | 211 &transport_security_state_, |
211 &crypto_client_stream_factory_, | 212 &crypto_client_stream_factory_, |
212 &random_generator_, | 213 &random_generator_, |
213 clock_, | 214 clock_, |
214 kDefaultMaxPacketSize, | 215 kDefaultMaxPacketSize, |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 EXPECT_TRUE(socket_data.AllReadDataConsumed()); | 1680 EXPECT_TRUE(socket_data.AllReadDataConsumed()); |
1680 EXPECT_TRUE(socket_data.AllWriteDataConsumed()); | 1681 EXPECT_TRUE(socket_data.AllWriteDataConsumed()); |
1681 EXPECT_TRUE(socket_data2.AllReadDataConsumed()); | 1682 EXPECT_TRUE(socket_data2.AllReadDataConsumed()); |
1682 EXPECT_TRUE(socket_data2.AllWriteDataConsumed()); | 1683 EXPECT_TRUE(socket_data2.AllWriteDataConsumed()); |
1683 EXPECT_TRUE(socket_data3.AllReadDataConsumed()); | 1684 EXPECT_TRUE(socket_data3.AllReadDataConsumed()); |
1684 EXPECT_TRUE(socket_data3.AllWriteDataConsumed()); | 1685 EXPECT_TRUE(socket_data3.AllWriteDataConsumed()); |
1685 } | 1686 } |
1686 | 1687 |
1687 } // namespace test | 1688 } // namespace test |
1688 } // namespace net | 1689 } // namespace net |
OLD | NEW |