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

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

Issue 318993004: To mitigate the effects of hanging 0-RTT QUIC connections, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 6 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_client_session.cc ('k') | net/quic/quic_http_stream_test.cc » ('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_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "net/base/capturing_net_log.h" 10 #include "net/base/capturing_net_log.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 protected: 66 protected:
67 QuicClientSessionTest() 67 QuicClientSessionTest()
68 : writer_(new TestPacketWriter(GetParam())), 68 : writer_(new TestPacketWriter(GetParam())),
69 connection_( 69 connection_(
70 new PacketSavingConnection(false, SupportedVersions(GetParam()))), 70 new PacketSavingConnection(false, SupportedVersions(GetParam()))),
71 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, NULL, 71 session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, NULL,
72 make_scoped_ptr((QuicServerInfo*)NULL), 72 make_scoped_ptr((QuicServerInfo*)NULL),
73 QuicServerId(kServerHostname, kServerPort, false, 73 QuicServerId(kServerHostname, kServerPort, false,
74 PRIVACY_MODE_DISABLED), 74 PRIVACY_MODE_DISABLED),
75 DefaultQuicConfig(), kInitialFlowControlWindowForTest, 75 DefaultQuicConfig(), kInitialFlowControlWindowForTest,
76 &crypto_config_, &net_log_) { 76 &crypto_config_,
77 base::MessageLoop::current()->message_loop_proxy().get(),
78 &net_log_) {
77 session_.config()->SetDefaults(); 79 session_.config()->SetDefaults();
78 crypto_config_.SetDefaults(); 80 crypto_config_.SetDefaults();
79 } 81 }
80 82
81 virtual void TearDown() OVERRIDE { 83 virtual void TearDown() OVERRIDE {
82 session_.CloseSessionOnError(ERR_ABORTED); 84 session_.CloseSessionOnError(ERR_ABORTED);
83 } 85 }
84 86
85 scoped_ptr<DatagramClientSocket> GetSocket() { 87 scoped_ptr<DatagramClientSocket> GetSocket() {
86 socket_factory_.AddSocketDataProvider(&socket_data_); 88 socket_factory_.AddSocketDataProvider(&socket_data_);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 164
163 // After receiving a GoAway, I should no longer be able to create outgoing 165 // After receiving a GoAway, I should no longer be able to create outgoing
164 // streams. 166 // streams.
165 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); 167 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away."));
166 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream()); 168 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream());
167 } 169 }
168 170
169 } // namespace 171 } // namespace
170 } // namespace test 172 } // namespace test
171 } // namespace net 173 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698