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

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

Issue 12253020: Enhance net internals/net log output for QUIC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix use after free Created 7 years, 10 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
« no previous file with comments | « net/quic/quic_http_stream.cc ('k') | net/quic/quic_reliable_client_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 receive_algorithm_ = new TestReceiveAlgorithm(NULL); 167 receive_algorithm_ = new TestReceiveAlgorithm(NULL);
168 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_)). 168 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_)).
169 WillRepeatedly(testing::Return(QuicTime::Delta::Zero())); 169 WillRepeatedly(testing::Return(QuicTime::Delta::Zero()));
170 helper_ = new QuicConnectionHelper(runner_.get(), &clock_, 170 helper_ = new QuicConnectionHelper(runner_.get(), &clock_,
171 &random_generator_, socket); 171 &random_generator_, socket);
172 connection_ = new TestQuicConnection(guid_, peer_addr_, helper_); 172 connection_ = new TestQuicConnection(guid_, peer_addr_, helper_);
173 connection_->set_visitor(&visitor_); 173 connection_->set_visitor(&visitor_);
174 connection_->SetSendAlgorithm(send_algorithm_); 174 connection_->SetSendAlgorithm(send_algorithm_);
175 connection_->SetReceiveAlgorithm(receive_algorithm_); 175 connection_->SetReceiveAlgorithm(receive_algorithm_);
176 session_.reset(new QuicClientSession(connection_, helper_, NULL, 176 session_.reset(new QuicClientSession(connection_, helper_, NULL,
177 "www.google.com")); 177 "www.google.com", NULL));
178 CryptoHandshakeMessage message; 178 CryptoHandshakeMessage message;
179 message.tag = kSHLO; 179 message.tag = kSHLO;
180 session_->GetCryptoStream()->OnHandshakeMessage(message); 180 session_->GetCryptoStream()->OnHandshakeMessage(message);
181 EXPECT_TRUE(session_->IsCryptoHandshakeComplete()); 181 EXPECT_TRUE(session_->IsCryptoHandshakeComplete());
182 QuicReliableClientStream* stream = 182 QuicReliableClientStream* stream =
183 session_->CreateOutgoingReliableStream(); 183 session_->CreateOutgoingReliableStream();
184 stream_.reset(use_closing_stream_ ? 184 stream_.reset(use_closing_stream_ ?
185 new AutoClosingStream(stream, GetParam()) : 185 new AutoClosingStream(stream, GetParam()) :
186 new QuicHttpStream(stream, GetParam())); 186 new QuicHttpStream(stream, GetParam()));
187 } 187 }
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 496
497 // In the course of processing this packet, the QuicHttpStream close itself. 497 // In the course of processing this packet, the QuicHttpStream close itself.
498 ProcessPacket(*resp); 498 ProcessPacket(*resp);
499 499
500 EXPECT_TRUE(AtEof()); 500 EXPECT_TRUE(AtEof());
501 } 501 }
502 502
503 } // namespace test 503 } // namespace test
504 504
505 } // namespace net 505 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_http_stream.cc ('k') | net/quic/quic_reliable_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698