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

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

Issue 47283002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compilation error Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_data_writer_test.cc ('k') | net/quic/quic_framer.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/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 QuicInMemoryCachePeer::ResetForTests(); 131 QuicInMemoryCachePeer::ResetForTests();
132 } 132 }
133 133
134 // Starts the QUIC server listening on a random port. 134 // Starts the QUIC server listening on a random port.
135 void StartServer() { 135 void StartServer() {
136 net::IPAddressNumber ip; 136 net::IPAddressNumber ip;
137 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip)); 137 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip));
138 server_address_ = IPEndPoint(ip, 0); 138 server_address_ = IPEndPoint(ip, 0);
139 server_config_.SetDefaults(); 139 server_config_.SetDefaults();
140 server_thread_.reset(new ServerThread(server_address_, server_config_, 140 server_thread_.reset(new ServerThread(server_address_, server_config_,
141 QuicSupportedVersions(),
141 strike_register_no_startup_period_)); 142 strike_register_no_startup_period_));
142 server_thread_->Start(); 143 server_thread_->Start();
143 server_thread_->listening()->Wait(); 144 server_thread_->listening()->Wait();
144 server_address_ = IPEndPoint(server_address_.address(), 145 server_address_ = IPEndPoint(server_address_.address(),
145 server_thread_->GetPort()); 146 server_thread_->GetPort());
146 server_started_ = true; 147 server_started_ = true;
147 } 148 }
148 149
149 // Stops the QUIC server. 150 // Stops the QUIC server.
150 void StopServer() { 151 void StopServer() {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 base::MessageLoop::current()->Run(); 301 base::MessageLoop::current()->Run();
301 302
302 for (size_t i = 0; i < num_requests; ++i) { 303 for (size_t i = 0; i < num_requests; ++i) {
303 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); 304 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody);
304 } 305 }
305 STLDeleteElements(&consumers); 306 STLDeleteElements(&consumers);
306 } 307 }
307 308
308 } // namespace test 309 } // namespace test
309 } // namespace net 310 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_data_writer_test.cc ('k') | net/quic/quic_framer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698