OLD | NEW |
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 QuicInMemoryCachePeer::ResetForTests(); | 129 QuicInMemoryCachePeer::ResetForTests(); |
130 } | 130 } |
131 | 131 |
132 // Starts the QUIC server listening on a random port. | 132 // Starts the QUIC server listening on a random port. |
133 void StartServer() { | 133 void StartServer() { |
134 net::IPAddressNumber ip; | 134 net::IPAddressNumber ip; |
135 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip)); | 135 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip)); |
136 server_address_ = IPEndPoint(ip, 0); | 136 server_address_ = IPEndPoint(ip, 0); |
137 server_config_.SetDefaults(); | 137 server_config_.SetDefaults(); |
138 server_config_.SetInitialFlowControlWindowToSend( | 138 server_config_.SetInitialFlowControlWindowToSend( |
139 kInitialFlowControlWindowForTest); | 139 kInitialSessionFlowControlWindowForTest); |
| 140 server_config_.SetInitialStreamFlowControlWindowToSend( |
| 141 kInitialStreamFlowControlWindowForTest); |
| 142 server_config_.SetInitialSessionFlowControlWindowToSend( |
| 143 kInitialSessionFlowControlWindowForTest); |
140 server_thread_.reset(new ServerThread( | 144 server_thread_.reset(new ServerThread( |
141 new QuicServer(server_config_, QuicSupportedVersions()), | 145 new QuicServer(server_config_, QuicSupportedVersions()), |
142 server_address_, | 146 server_address_, |
143 strike_register_no_startup_period_)); | 147 strike_register_no_startup_period_)); |
144 server_thread_->Initialize(); | 148 server_thread_->Initialize(); |
145 server_address_ = IPEndPoint(server_address_.address(), | 149 server_address_ = IPEndPoint(server_address_.address(), |
146 server_thread_->GetPort()); | 150 server_thread_->GetPort()); |
147 server_thread_->Start(); | 151 server_thread_->Start(); |
148 server_started_ = true; | 152 server_started_ = true; |
149 } | 153 } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 base::MessageLoop::current()->Run(); | 306 base::MessageLoop::current()->Run(); |
303 | 307 |
304 for (size_t i = 0; i < num_requests; ++i) { | 308 for (size_t i = 0; i < num_requests; ++i) { |
305 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); | 309 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); |
306 } | 310 } |
307 STLDeleteElements(&consumers); | 311 STLDeleteElements(&consumers); |
308 } | 312 } |
309 | 313 |
310 } // namespace test | 314 } // namespace test |
311 } // namespace net | 315 } // namespace net |
OLD | NEW |