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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « net/tools/dump_cache/cache_dumper.cc ('k') | net/tools/quic/quic_client.cc » ('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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 client_->client()->session()->connection())), 312 client_->client()->session()->connection())),
313 new ClientDelegate(client_->client())); 313 new ClientDelegate(client_->client()));
314 return client_->client()->connected(); 314 return client_->client()->connected();
315 } 315 }
316 316
317 void SetUp() override { 317 void SetUp() override {
318 // The ownership of these gets transferred to the QuicPacketWriterWrapper 318 // The ownership of these gets transferred to the QuicPacketWriterWrapper
319 // and TestWriterFactory when Initialize() is executed. 319 // and TestWriterFactory when Initialize() is executed.
320 client_writer_ = new PacketDroppingTestWriter(); 320 client_writer_ = new PacketDroppingTestWriter();
321 server_writer_ = new PacketDroppingTestWriter(); 321 server_writer_ = new PacketDroppingTestWriter();
322 // TODO(ianswett): Remove this once it's fully rolled out.
323 FLAGS_quic_enable_pacing = false;
322 } 324 }
323 325
324 void TearDown() override { StopServer(); } 326 void TearDown() override { StopServer(); }
325 327
326 void StartServer() { 328 void StartServer() {
327 server_thread_.reset( 329 server_thread_.reset(
328 new ServerThread( 330 new ServerThread(
329 new QuicServer(server_config_, server_supported_versions_), 331 new QuicServer(server_config_, server_supported_versions_),
330 server_address_, 332 server_address_,
331 strike_register_no_startup_period_)); 333 strike_register_no_startup_period_));
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 bool has_been_notified_ = false; 1401 bool has_been_notified_ = false;
1400 }; 1402 };
1401 1403
1402 TEST_P(EndToEndTest, AckNotifierWithPacketLossAndBlockedSocket) { 1404 TEST_P(EndToEndTest, AckNotifierWithPacketLossAndBlockedSocket) {
1403 // Verify that even in the presence of packet loss and occasionally blocked 1405 // Verify that even in the presence of packet loss and occasionally blocked
1404 // socket, an AckNotifierDelegate will get informed that the data it is 1406 // socket, an AckNotifierDelegate will get informed that the data it is
1405 // interested in has been ACKed. This tests end-to-end ACK notification, and 1407 // interested in has been ACKed. This tests end-to-end ACK notification, and
1406 // demonstrates that retransmissions do not break this functionality. 1408 // demonstrates that retransmissions do not break this functionality.
1407 ValueRestore<bool> old_flag(&FLAGS_quic_attach_ack_notifiers_to_packets, 1409 ValueRestore<bool> old_flag(&FLAGS_quic_attach_ack_notifiers_to_packets,
1408 true); 1410 true);
1409 ValueRestore<bool> old_flag2(&FLAGS_quic_ack_notifier_informed_on_serialized,
1410 true);
1411 1411
1412 SetPacketLossPercentage(5); 1412 SetPacketLossPercentage(5);
1413 ASSERT_TRUE(Initialize()); 1413 ASSERT_TRUE(Initialize());
1414 1414
1415 // Wait for the server SHLO before upping the packet loss. 1415 // Wait for the server SHLO before upping the packet loss.
1416 client_->client()->WaitForCryptoHandshakeConfirmed(); 1416 client_->client()->WaitForCryptoHandshakeConfirmed();
1417 SetPacketLossPercentage(30); 1417 SetPacketLossPercentage(30);
1418 client_writer_->set_fake_blocked_socket_percentage(10); 1418 client_writer_->set_fake_blocked_socket_percentage(10);
1419 1419
1420 // Create a POST request and send the headers only. 1420 // Create a POST request and send the headers only.
(...skipping 25 matching lines...) Expand all
1446 // Waits for up to 50 ms. 1446 // Waits for up to 50 ms.
1447 client_->client()->WaitForEvents(); 1447 client_->client()->WaitForEvents();
1448 } 1448 }
1449 server_thread_->Resume(); 1449 server_thread_->Resume();
1450 } 1450 }
1451 1451
1452 } // namespace 1452 } // namespace
1453 } // namespace test 1453 } // namespace test
1454 } // namespace tools 1454 } // namespace tools
1455 } // namespace net 1455 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/dump_cache/cache_dumper.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698