Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: trunk/src/net/quic/quic_http_stream_test.cc

Issue 485943004: Revert 290320 "Refactor pooling logic into a helper method" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_http_stream.h" 5 #include "net/quic/quic_http_stream.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
11 #include "net/base/upload_bytes_element_reader.h" 11 #include "net/base/upload_bytes_element_reader.h"
12 #include "net/base/upload_data_stream.h" 12 #include "net/base/upload_data_stream.h"
13 #include "net/http/http_response_headers.h" 13 #include "net/http/http_response_headers.h"
14 #include "net/http/transport_security_state.h"
15 #include "net/quic/congestion_control/receive_algorithm_interface.h" 14 #include "net/quic/congestion_control/receive_algorithm_interface.h"
16 #include "net/quic/congestion_control/send_algorithm_interface.h" 15 #include "net/quic/congestion_control/send_algorithm_interface.h"
17 #include "net/quic/crypto/crypto_protocol.h" 16 #include "net/quic/crypto/crypto_protocol.h"
18 #include "net/quic/crypto/quic_decrypter.h" 17 #include "net/quic/crypto/quic_decrypter.h"
19 #include "net/quic/crypto/quic_encrypter.h" 18 #include "net/quic/crypto/quic_encrypter.h"
20 #include "net/quic/crypto/quic_server_info.h" 19 #include "net/quic/crypto/quic_server_info.h"
21 #include "net/quic/quic_client_session.h" 20 #include "net/quic/quic_client_session.h"
22 #include "net/quic/quic_connection.h" 21 #include "net/quic/quic_connection.h"
23 #include "net/quic/quic_connection_helper.h" 22 #include "net/quic/quic_connection_helper.h"
24 #include "net/quic/quic_default_packet_writer.h" 23 #include "net/quic/quic_default_packet_writer.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 helper_.get(), writer_.get()); 207 helper_.get(), writer_.get());
209 connection_->set_visitor(&visitor_); 208 connection_->set_visitor(&visitor_);
210 connection_->SetSendAlgorithm(send_algorithm_); 209 connection_->SetSendAlgorithm(send_algorithm_);
211 connection_->SetReceiveAlgorithm(receive_algorithm_); 210 connection_->SetReceiveAlgorithm(receive_algorithm_);
212 crypto_config_.SetDefaults(); 211 crypto_config_.SetDefaults();
213 session_.reset( 212 session_.reset(
214 new QuicClientSession(connection_, 213 new QuicClientSession(connection_,
215 scoped_ptr<DatagramClientSocket>(socket), 214 scoped_ptr<DatagramClientSocket>(socket),
216 writer_.Pass(), NULL, 215 writer_.Pass(), NULL,
217 &crypto_client_stream_factory_, 216 &crypto_client_stream_factory_,
218 &transport_security_state_,
219 make_scoped_ptr((QuicServerInfo*)NULL), 217 make_scoped_ptr((QuicServerInfo*)NULL),
220 QuicServerId(kServerHostname, kServerPort, 218 QuicServerId(kServerHostname, kServerPort,
221 false, PRIVACY_MODE_DISABLED), 219 false, PRIVACY_MODE_DISABLED),
222 DefaultQuicConfig(), &crypto_config_, 220 DefaultQuicConfig(), &crypto_config_,
223 base::MessageLoop::current()-> 221 base::MessageLoop::current()->
224 message_loop_proxy().get(), 222 message_loop_proxy().get(),
225 NULL)); 223 NULL));
226 session_->InitializeSession(); 224 session_->InitializeSession();
227 session_->GetCryptoStream()->CryptoConnect(); 225 session_->GetCryptoStream()->CryptoConnect();
228 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); 226 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 MockSendAlgorithm* send_algorithm_; 292 MockSendAlgorithm* send_algorithm_;
295 TestReceiveAlgorithm* receive_algorithm_; 293 TestReceiveAlgorithm* receive_algorithm_;
296 scoped_refptr<TestTaskRunner> runner_; 294 scoped_refptr<TestTaskRunner> runner_;
297 scoped_ptr<MockWrite[]> mock_writes_; 295 scoped_ptr<MockWrite[]> mock_writes_;
298 MockClock clock_; 296 MockClock clock_;
299 TestQuicConnection* connection_; 297 TestQuicConnection* connection_;
300 scoped_ptr<QuicConnectionHelper> helper_; 298 scoped_ptr<QuicConnectionHelper> helper_;
301 testing::StrictMock<MockConnectionVisitor> visitor_; 299 testing::StrictMock<MockConnectionVisitor> visitor_;
302 scoped_ptr<QuicHttpStream> stream_; 300 scoped_ptr<QuicHttpStream> stream_;
303 scoped_ptr<QuicDefaultPacketWriter> writer_; 301 scoped_ptr<QuicDefaultPacketWriter> writer_;
304 TransportSecurityState transport_security_state_;
305 scoped_ptr<QuicClientSession> session_; 302 scoped_ptr<QuicClientSession> session_;
306 QuicCryptoClientConfig crypto_config_; 303 QuicCryptoClientConfig crypto_config_;
307 TestCompletionCallback callback_; 304 TestCompletionCallback callback_;
308 HttpRequestInfo request_; 305 HttpRequestInfo request_;
309 HttpRequestHeaders headers_; 306 HttpRequestHeaders headers_;
310 HttpResponseInfo response_; 307 HttpResponseInfo response_;
311 scoped_refptr<IOBufferWithSize> read_buffer_; 308 scoped_refptr<IOBufferWithSize> read_buffer_;
312 SpdyHeaderBlock request_headers_; 309 SpdyHeaderBlock request_headers_;
313 SpdyHeaderBlock response_headers_; 310 SpdyHeaderBlock response_headers_;
314 std::string request_data_; 311 std::string request_data_;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 // Set Delegate to NULL and make sure EffectivePriority returns highest 618 // Set Delegate to NULL and make sure EffectivePriority returns highest
622 // priority. 619 // priority.
623 reliable_stream->SetDelegate(NULL); 620 reliable_stream->SetDelegate(NULL);
624 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, 621 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority,
625 reliable_stream->EffectivePriority()); 622 reliable_stream->EffectivePriority());
626 reliable_stream->SetDelegate(delegate); 623 reliable_stream->SetDelegate(delegate);
627 } 624 }
628 625
629 } // namespace test 626 } // namespace test
630 } // namespace net 627 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/quic/quic_client_session_test.cc ('k') | trunk/src/net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698