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

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

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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
« no previous file with comments | « net/quic/quic_session.cc ('k') | net/quic/quic_stream_factory.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_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 private: 178 private:
179 StrictMock<TestCryptoStream> crypto_stream_; 179 StrictMock<TestCryptoStream> crypto_stream_;
180 180
181 bool writev_consumes_all_data_; 181 bool writev_consumes_all_data_;
182 }; 182 };
183 183
184 class QuicSessionTest : public ::testing::TestWithParam<QuicVersion> { 184 class QuicSessionTest : public ::testing::TestWithParam<QuicVersion> {
185 protected: 185 protected:
186 QuicSessionTest() 186 QuicSessionTest()
187 : connection_(new MockConnection(true, SupportedVersions(GetParam()))), 187 : connection_(new MockConnection(Perspective::IS_SERVER,
188 SupportedVersions(GetParam()))),
188 session_(connection_) { 189 session_(connection_) {
189 session_.config()->SetInitialStreamFlowControlWindowToSend( 190 session_.config()->SetInitialStreamFlowControlWindowToSend(
190 kInitialStreamFlowControlWindowForTest); 191 kInitialStreamFlowControlWindowForTest);
191 session_.config()->SetInitialSessionFlowControlWindowToSend( 192 session_.config()->SetInitialSessionFlowControlWindowToSend(
192 kInitialSessionFlowControlWindowForTest); 193 kInitialSessionFlowControlWindowForTest);
193 headers_[":host"] = "www.google.com"; 194 headers_[":host"] = "www.google.com";
194 headers_[":path"] = "/index.hml"; 195 headers_[":path"] = "/index.hml";
195 headers_[":scheme"] = "http"; 196 headers_[":scheme"] = "http";
196 headers_["cookie"] = 197 headers_["cookie"] =
197 "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; " 198 "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; "
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 } 968 }
968 969
969 // Called after any new data is received by the session, and triggers the call 970 // Called after any new data is received by the session, and triggers the call
970 // to close the connection. 971 // to close the connection.
971 session_.PostProcessAfterData(); 972 session_.PostProcessAfterData();
972 } 973 }
973 974
974 } // namespace 975 } // namespace
975 } // namespace test 976 } // namespace test
976 } // namespace net 977 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698