| 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 <memory> | 5 #include <memory> |
| 6 #include <ostream> | 6 #include <ostream> |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // Starts the QUIC server listening on a random port. | 180 // Starts the QUIC server listening on a random port. |
| 181 void StartServer() { | 181 void StartServer() { |
| 182 server_address_ = IPEndPoint(IPAddress(127, 0, 0, 1), 0); | 182 server_address_ = IPEndPoint(IPAddress(127, 0, 0, 1), 0); |
| 183 server_config_.SetInitialStreamFlowControlWindowToSend( | 183 server_config_.SetInitialStreamFlowControlWindowToSend( |
| 184 kInitialStreamFlowControlWindowForTest); | 184 kInitialStreamFlowControlWindowForTest); |
| 185 server_config_.SetInitialSessionFlowControlWindowToSend( | 185 server_config_.SetInitialSessionFlowControlWindowToSend( |
| 186 kInitialSessionFlowControlWindowForTest); | 186 kInitialSessionFlowControlWindowForTest); |
| 187 server_config_options_.token_binding_enabled = true; | 187 server_config_options_.token_binding_enabled = true; |
| 188 QuicServer* server = | 188 QuicServer* server = |
| 189 new QuicServer(CryptoTestUtils::ProofSourceForTesting(), server_config_, | 189 new QuicServer(CryptoTestUtils::ProofSourceForTesting(), server_config_, |
| 190 server_config_options_, QuicSupportedVersions()); | 190 server_config_options_, AllSupportedVersions()); |
| 191 server_thread_.reset(new ServerThread(server, server_address_, | 191 server_thread_.reset(new ServerThread(server, server_address_, |
| 192 strike_register_no_startup_period_)); | 192 strike_register_no_startup_period_)); |
| 193 server_thread_->Initialize(); | 193 server_thread_->Initialize(); |
| 194 server_address_ = | 194 server_address_ = |
| 195 IPEndPoint(server_address_.address(), server_thread_->GetPort()); | 195 IPEndPoint(server_address_.address(), server_thread_->GetPort()); |
| 196 server_thread_->Start(); | 196 server_thread_->Start(); |
| 197 server_started_ = true; | 197 server_started_ = true; |
| 198 } | 198 } |
| 199 | 199 |
| 200 // Stops the QUIC server. | 200 // Stops the QUIC server. |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 base::RunLoop().Run(); | 382 base::RunLoop().Run(); |
| 383 | 383 |
| 384 for (size_t i = 0; i < num_requests; ++i) { | 384 for (size_t i = 0; i < num_requests; ++i) { |
| 385 CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody); | 385 CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody); |
| 386 } | 386 } |
| 387 STLDeleteElements(&consumers); | 387 STLDeleteElements(&consumers); |
| 388 } | 388 } |
| 389 | 389 |
| 390 } // namespace test | 390 } // namespace test |
| 391 } // namespace net | 391 } // namespace net |
| OLD | NEW |