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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « net/quic/quic_crypto_stream_test.cc ('k') | net/quic/quic_flags.h » ('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/elements_upload_data_stream.h" 10 #include "net/base/elements_upload_data_stream.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void TearDown() override { 123 void TearDown() override {
124 StopServer(); 124 StopServer();
125 QuicInMemoryCachePeer::ResetForTests(); 125 QuicInMemoryCachePeer::ResetForTests();
126 } 126 }
127 127
128 // Starts the QUIC server listening on a random port. 128 // Starts the QUIC server listening on a random port.
129 void StartServer() { 129 void StartServer() {
130 net::IPAddressNumber ip; 130 net::IPAddressNumber ip;
131 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip)); 131 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip));
132 server_address_ = IPEndPoint(ip, 0); 132 server_address_ = IPEndPoint(ip, 0);
133 server_config_.SetInitialFlowControlWindowToSend(
134 kInitialSessionFlowControlWindowForTest);
135 server_config_.SetInitialStreamFlowControlWindowToSend( 133 server_config_.SetInitialStreamFlowControlWindowToSend(
136 kInitialStreamFlowControlWindowForTest); 134 kInitialStreamFlowControlWindowForTest);
137 server_config_.SetInitialSessionFlowControlWindowToSend( 135 server_config_.SetInitialSessionFlowControlWindowToSend(
138 kInitialSessionFlowControlWindowForTest); 136 kInitialSessionFlowControlWindowForTest);
139 server_thread_.reset(new ServerThread( 137 server_thread_.reset(new ServerThread(
140 new QuicServer(server_config_, QuicSupportedVersions()), 138 new QuicServer(server_config_, QuicSupportedVersions()),
141 server_address_, 139 server_address_,
142 strike_register_no_startup_period_)); 140 strike_register_no_startup_period_));
143 server_thread_->Initialize(); 141 server_thread_->Initialize();
144 server_address_ = IPEndPoint(server_address_.address(), 142 server_address_ = IPEndPoint(server_address_.address(),
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 base::MessageLoop::current()->Run(); 300 base::MessageLoop::current()->Run();
303 301
304 for (size_t i = 0; i < num_requests; ++i) { 302 for (size_t i = 0; i < num_requests; ++i) {
305 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); 303 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody);
306 } 304 }
307 STLDeleteElements(&consumers); 305 STLDeleteElements(&consumers);
308 } 306 }
309 307
310 } // namespace test 308 } // namespace test
311 } // namespace net 309 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_stream_test.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698