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

Side by Side Diff: net/tools/quic/end_to_end_test.cc

Issue 331963002: Test tools for udp proxying. This involves a few refactors of test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_end_to_end_unittest.cc ('k') | net/tools/quic/quic_server.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <string> 6 #include <string>
7 #include <sys/epoll.h> 7 #include <sys/epoll.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 client_writer_ = new PacketDroppingTestWriter(); 243 client_writer_ = new PacketDroppingTestWriter();
244 server_writer_ = new PacketDroppingTestWriter(); 244 server_writer_ = new PacketDroppingTestWriter();
245 } 245 }
246 246
247 virtual void TearDown() OVERRIDE { 247 virtual void TearDown() OVERRIDE {
248 StopServer(); 248 StopServer();
249 } 249 }
250 250
251 void StartServer() { 251 void StartServer() {
252 server_thread_.reset( 252 server_thread_.reset(
253 new ServerThread(server_address_, 253 new ServerThread(
254 server_config_, 254 new QuicServer(server_config_, server_supported_versions_),
255 server_supported_versions_, 255 server_address_,
256 strike_register_no_startup_period_)); 256 strike_register_no_startup_period_));
257 server_thread_->Initialize(); 257 server_thread_->Initialize();
258 server_address_ = IPEndPoint(server_address_.address(), 258 server_address_ = IPEndPoint(server_address_.address(),
259 server_thread_->GetPort()); 259 server_thread_->GetPort());
260 QuicDispatcher* dispatcher = 260 QuicDispatcher* dispatcher =
261 QuicServerPeer::GetDispatcher(server_thread_->server()); 261 QuicServerPeer::GetDispatcher(server_thread_->server());
262 QuicDispatcherPeer::UseWriter(dispatcher, server_writer_); 262 QuicDispatcherPeer::UseWriter(dispatcher, server_writer_);
263 server_writer_->Initialize( 263 server_writer_->Initialize(
264 QuicDispatcherPeer::GetHelper(dispatcher), 264 QuicDispatcherPeer::GetHelper(dispatcher),
265 new ServerDelegate(dispatcher)); 265 new ServerDelegate(dispatcher));
266 server_thread_->Start(); 266 server_thread_->Start();
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 QuicSession* session = dispatcher->session_map().begin()->second; 1133 QuicSession* session = dispatcher->session_map().begin()->second;
1134 EXPECT_EQ(kClientIFCW, 1134 EXPECT_EQ(kClientIFCW,
1135 session->config()->ReceivedInitialFlowControlWindowBytes()); 1135 session->config()->ReceivedInitialFlowControlWindowBytes());
1136 server_thread_->Resume(); 1136 server_thread_->Resume();
1137 } 1137 }
1138 1138
1139 } // namespace 1139 } // namespace
1140 } // namespace test 1140 } // namespace test
1141 } // namespace tools 1141 } // namespace tools
1142 } // namespace net 1142 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_end_to_end_unittest.cc ('k') | net/tools/quic/quic_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698