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

Unified Diff: net/quic/core/quic_connection_test.cc

Issue 2353063002: Only inform QUIC's SentPacketManager of packets that are actually sent, not those that failed to be… (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_connection.cc ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection_test.cc
diff --git a/net/quic/core/quic_connection_test.cc b/net/quic/core/quic_connection_test.cc
index 5d6f9e284dd4d261b0fc44b6043da58cd6bca74d..3bf6045f6df72355efeb75132dad821de2164a72 100644
--- a/net/quic/core/quic_connection_test.cc
+++ b/net/quic/core/quic_connection_test.cc
@@ -5185,9 +5185,12 @@ TEST_P(QuicConnectionTest, ClientReceivesRejOnNonCryptoStream) {
TEST_P(QuicConnectionTest, CloseConnectionOnPacketTooLarge) {
SimulateNextPacketTooLarge();
- // Although the data packet cannot be written, the send packet manager is
- // informed. Also a connection close packet is sent.
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
+ if (!FLAGS_quic_only_track_sent_packets) {
+ // Although the data packet cannot be written, the send packet manager is
+ // informed.
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
+ }
+ // A connection close packet is sent
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PACKET_WRITE_ERROR, _,
ConnectionCloseSource::FROM_SELF))
.Times(1);
@@ -5198,7 +5201,9 @@ TEST_P(QuicConnectionTest, AlwaysGetPacketTooLarge) {
// Test even we always get packet too large, we do not infinitely try to send
// close packet.
AlwaysGetPacketTooLarge();
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
+ if (!FLAGS_quic_only_track_sent_packets) {
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
+ }
EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_PACKET_WRITE_ERROR, _,
ConnectionCloseSource::FROM_SELF))
.Times(1);
« no previous file with comments | « net/quic/core/quic_connection.cc ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698