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

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

Issue 333803007: Rather than passing initial_flow_control_window all the way down the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_crypto_server_stream.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 StopServer(); 126 StopServer();
127 QuicInMemoryCachePeer::ResetForTests(); 127 QuicInMemoryCachePeer::ResetForTests();
128 } 128 }
129 129
130 // Starts the QUIC server listening on a random port. 130 // Starts the QUIC server listening on a random port.
131 void StartServer() { 131 void StartServer() {
132 net::IPAddressNumber ip; 132 net::IPAddressNumber ip;
133 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip)); 133 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip));
134 server_address_ = IPEndPoint(ip, 0); 134 server_address_ = IPEndPoint(ip, 0);
135 server_config_.SetDefaults(); 135 server_config_.SetDefaults();
136 server_config_.SetInitialFlowControlWindowToSend(
137 kInitialFlowControlWindowForTest);
136 server_thread_.reset(new ServerThread(server_address_, server_config_, 138 server_thread_.reset(new ServerThread(server_address_, server_config_,
137 QuicSupportedVersions(), 139 QuicSupportedVersions(),
138 strike_register_no_startup_period_, 140 strike_register_no_startup_period_));
139 kInitialFlowControlWindowForTest));
140 server_thread_->Initialize(); 141 server_thread_->Initialize();
141 server_address_ = IPEndPoint(server_address_.address(), 142 server_address_ = IPEndPoint(server_address_.address(),
142 server_thread_->GetPort()); 143 server_thread_->GetPort());
143 server_thread_->Start(); 144 server_thread_->Start();
144 server_started_ = true; 145 server_started_ = true;
145 } 146 }
146 147
147 // Stops the QUIC server. 148 // Stops the QUIC server.
148 void StopServer() { 149 void StopServer() {
149 if (!server_started_) { 150 if (!server_started_) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 base::MessageLoop::current()->Run(); 299 base::MessageLoop::current()->Run();
299 300
300 for (size_t i = 0; i < num_requests; ++i) { 301 for (size_t i = 0; i < num_requests; ++i) {
301 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); 302 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody);
302 } 303 }
303 STLDeleteElements(&consumers); 304 STLDeleteElements(&consumers);
304 } 305 }
305 306
306 } // namespace test 307 } // namespace test
307 } // namespace net 308 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698