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

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

Issue 2671333004: Convert class-full-of-statics CryptoTestUtils into a namespace (Closed)
Patch Set: Created 3 years, 10 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
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 <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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // Starts the QUIC server listening on a random port. 173 // Starts the QUIC server listening on a random port.
174 void StartServer() { 174 void StartServer() {
175 server_address_ = IPEndPoint(IPAddress(127, 0, 0, 1), 0); 175 server_address_ = IPEndPoint(IPAddress(127, 0, 0, 1), 0);
176 server_config_.SetInitialStreamFlowControlWindowToSend( 176 server_config_.SetInitialStreamFlowControlWindowToSend(
177 kInitialStreamFlowControlWindowForTest); 177 kInitialStreamFlowControlWindowForTest);
178 server_config_.SetInitialSessionFlowControlWindowToSend( 178 server_config_.SetInitialSessionFlowControlWindowToSend(
179 kInitialSessionFlowControlWindowForTest); 179 kInitialSessionFlowControlWindowForTest);
180 server_config_options_.token_binding_params = QuicTagVector{kTB10, kP256}; 180 server_config_options_.token_binding_params = QuicTagVector{kTB10, kP256};
181 server_.reset(new QuicSimpleServer( 181 server_.reset(new QuicSimpleServer(
182 CryptoTestUtils::ProofSourceForTesting(), server_config_, 182 crypto_test_utils::ProofSourceForTesting(), server_config_,
183 server_config_options_, AllSupportedVersions(), &response_cache_)); 183 server_config_options_, AllSupportedVersions(), &response_cache_));
184 server_->Listen(server_address_); 184 server_->Listen(server_address_);
185 server_address_ = server_->server_address(); 185 server_address_ = server_->server_address();
186 server_->StartReading(); 186 server_->StartReading();
187 server_started_ = true; 187 server_started_ = true;
188 } 188 }
189 189
190 // Adds an entry to the cache used by the QUIC server to serve 190 // Adds an entry to the cache used by the QUIC server to serve
191 // responses. 191 // responses.
192 void AddToCache(StringPiece path, 192 void AddToCache(StringPiece path,
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 // Will terminate when the last consumer completes. 365 // Will terminate when the last consumer completes.
366 base::RunLoop().Run(); 366 base::RunLoop().Run();
367 367
368 for (const auto& consumer : consumers) 368 for (const auto& consumer : consumers)
369 CheckResponse(*consumer.get(), "HTTP/1.1 200", kResponseBody); 369 CheckResponse(*consumer.get(), "HTTP/1.1 200", kResponseBody);
370 } 370 }
371 371
372 } // namespace test 372 } // namespace test
373 } // namespace net 373 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_stream_test.cc ('k') | net/quic/chromium/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698