| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 server_config_.SetInitialStreamFlowControlWindowToSend( | 178 server_config_.SetInitialStreamFlowControlWindowToSend( |
| 179 kInitialStreamFlowControlWindowForTest); | 179 kInitialStreamFlowControlWindowForTest); |
| 180 server_config_.SetInitialSessionFlowControlWindowToSend( | 180 server_config_.SetInitialSessionFlowControlWindowToSend( |
| 181 kInitialSessionFlowControlWindowForTest); | 181 kInitialSessionFlowControlWindowForTest); |
| 182 server_config_options_.token_binding_enabled = true; | 182 server_config_options_.token_binding_enabled = true; |
| 183 server_.reset(new QuicSimpleServer(CryptoTestUtils::ProofSourceForTesting(), | 183 server_.reset(new QuicSimpleServer(CryptoTestUtils::ProofSourceForTesting(), |
| 184 server_config_, server_config_options_, | 184 server_config_, server_config_options_, |
| 185 AllSupportedVersions())); | 185 AllSupportedVersions())); |
| 186 server_->Listen(server_address_); | 186 server_->Listen(server_address_); |
| 187 server_address_ = server_->server_address(); | 187 server_address_ = server_->server_address(); |
| 188 server_->StartReading(); | 188 server_->StartReading(true); |
| 189 server_started_ = true; | 189 server_started_ = true; |
| 190 } | 190 } |
| 191 | 191 |
| 192 // Adds an entry to the cache used by the QUIC server to serve | 192 // Adds an entry to the cache used by the QUIC server to serve |
| 193 // responses. | 193 // responses. |
| 194 void AddToCache(StringPiece path, | 194 void AddToCache(StringPiece path, |
| 195 int response_code, | 195 int response_code, |
| 196 StringPiece response_detail, | 196 StringPiece response_detail, |
| 197 StringPiece body) { | 197 StringPiece body) { |
| 198 QuicInMemoryCache::GetInstance()->AddSimpleResponse( | 198 QuicInMemoryCache::GetInstance()->AddSimpleResponse( |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 base::RunLoop().Run(); | 364 base::RunLoop().Run(); |
| 365 | 365 |
| 366 for (size_t i = 0; i < num_requests; ++i) { | 366 for (size_t i = 0; i < num_requests; ++i) { |
| 367 CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody); | 367 CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody); |
| 368 } | 368 } |
| 369 base::STLDeleteElements(&consumers); | 369 base::STLDeleteElements(&consumers); |
| 370 } | 370 } |
| 371 | 371 |
| 372 } // namespace test | 372 } // namespace test |
| 373 } // namespace net | 373 } // namespace net |
| OLD | NEW |