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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 EXPECT_EQ(nullptr, CreateIfSessionExists(destination, net_log_).get()); | 233 EXPECT_EQ(nullptr, CreateIfSessionExists(destination, net_log_).get()); |
234 EXPECT_TRUE(socket_data.at_read_eof()); | 234 EXPECT_TRUE(socket_data.at_read_eof()); |
235 EXPECT_TRUE(socket_data.at_write_eof()); | 235 EXPECT_TRUE(socket_data.at_write_eof()); |
236 return port; | 236 return port; |
237 } | 237 } |
238 | 238 |
239 scoped_ptr<QuicEncryptedPacket> ConstructRstPacket() { | 239 scoped_ptr<QuicEncryptedPacket> ConstructRstPacket() { |
240 QuicStreamId stream_id = kClientDataStreamId1; | 240 QuicStreamId stream_id = kClientDataStreamId1; |
241 return maker_.MakeRstPacket( | 241 return maker_.MakeRstPacket( |
242 1, true, stream_id, | 242 1, true, stream_id, |
243 AdjustErrorForVersion(QUIC_RST_FLOW_CONTROL_ACCOUNTING, GetParam())); | 243 AdjustErrorForVersion(QUIC_RST_ACKNOWLEDGEMENT, GetParam())); |
244 } | 244 } |
245 | 245 |
246 MockQuicServerInfoFactory quic_server_info_factory_; | 246 MockQuicServerInfoFactory quic_server_info_factory_; |
247 MockHostResolver host_resolver_; | 247 MockHostResolver host_resolver_; |
248 DeterministicMockClientSocketFactory socket_factory_; | 248 DeterministicMockClientSocketFactory socket_factory_; |
249 MockCryptoClientStreamFactory crypto_client_stream_factory_; | 249 MockCryptoClientStreamFactory crypto_client_stream_factory_; |
250 MockRandom random_generator_; | 250 MockRandom random_generator_; |
251 MockClock* clock_; // Owned by factory_. | 251 MockClock* clock_; // Owned by factory_. |
252 scoped_refptr<TestTaskRunner> runner_; | 252 scoped_refptr<TestTaskRunner> runner_; |
253 QuicTestPacketMaker maker_; | 253 QuicTestPacketMaker maker_; |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 ASSERT_EQ(0u, runner_->GetPostedTasks().size()); | 1595 ASSERT_EQ(0u, runner_->GetPostedTasks().size()); |
1596 | 1596 |
1597 scoped_ptr<QuicHttpStream> stream = request.ReleaseStream(); | 1597 scoped_ptr<QuicHttpStream> stream = request.ReleaseStream(); |
1598 EXPECT_TRUE(stream.get()); | 1598 EXPECT_TRUE(stream.get()); |
1599 EXPECT_TRUE(socket_data.at_read_eof()); | 1599 EXPECT_TRUE(socket_data.at_read_eof()); |
1600 EXPECT_TRUE(socket_data.at_write_eof()); | 1600 EXPECT_TRUE(socket_data.at_write_eof()); |
1601 } | 1601 } |
1602 | 1602 |
1603 } // namespace test | 1603 } // namespace test |
1604 } // namespace net | 1604 } // namespace net |
OLD | NEW |