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

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

Issue 393953009: Moving the work currently done in the QuicSession constructor to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 QuicSession* const session_; 118 QuicSession* const session_;
119 const QuicStreamId stream_id_; 119 const QuicStreamId stream_id_;
120 }; 120 };
121 121
122 class TestSession : public QuicSession { 122 class TestSession : public QuicSession {
123 public: 123 public:
124 explicit TestSession(QuicConnection* connection) 124 explicit TestSession(QuicConnection* connection)
125 : QuicSession(connection, 125 : QuicSession(connection,
126 DefaultQuicConfig()), 126 DefaultQuicConfig()),
127 crypto_stream_(this), 127 crypto_stream_(this),
128 writev_consumes_all_data_(false) {} 128 writev_consumes_all_data_(false) {
129 InitializeSession();
130 }
129 131
130 virtual TestCryptoStream* GetCryptoStream() OVERRIDE { 132 virtual TestCryptoStream* GetCryptoStream() OVERRIDE {
131 return &crypto_stream_; 133 return &crypto_stream_;
132 } 134 }
133 135
134 virtual TestStream* CreateOutgoingDataStream() OVERRIDE { 136 virtual TestStream* CreateOutgoingDataStream() OVERRIDE {
135 TestStream* stream = new TestStream(GetNextStreamId(), this); 137 TestStream* stream = new TestStream(GetNextStreamId(), this);
136 ActivateStream(stream); 138 ActivateStream(stream);
137 return stream; 139 return stream;
138 } 140 }
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 914
913 // Version 16 means all flow control is disabled. 915 // Version 16 means all flow control is disabled.
914 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16); 916 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16);
915 EXPECT_FALSE(session_.flow_controller()->IsEnabled()); 917 EXPECT_FALSE(session_.flow_controller()->IsEnabled());
916 EXPECT_FALSE(stream->flow_controller()->IsEnabled()); 918 EXPECT_FALSE(stream->flow_controller()->IsEnabled());
917 } 919 }
918 920
919 } // namespace 921 } // namespace
920 } // namespace test 922 } // namespace test
921 } // namespace net 923 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698