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

Unified Diff: net/quic/quic_ack_notifier_test.cc

Issue 872403007: Remove an unneeded hash_set from QuicAckNotifierManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Minor_cleanup_84624803
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_ack_notifier_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_ack_notifier_test.cc
diff --git a/net/quic/quic_ack_notifier_test.cc b/net/quic/quic_ack_notifier_test.cc
index 5afbd6f5112e108c73ea50a095c34001bd735cbb..75d1b1e938f9be53624459ef37e92d214bd8e858 100644
--- a/net/quic/quic_ack_notifier_test.cc
+++ b/net/quic/quic_ack_notifier_test.cc
@@ -48,6 +48,15 @@ TEST_F(QuicAckNotifierTest, DoesNotTrigger) {
EXPECT_FALSE(notifier_->OnAck(99, zero_));
}
+// Should not trigger callback if we abandon all three packets.
+TEST_F(QuicAckNotifierTest, AbandonDoesNotTrigger) {
+ // Should not trigger callback as not all packets have been seen.
+ EXPECT_CALL(*delegate_, OnAckNotification(_, _, _)).Times(0);
+ EXPECT_FALSE(notifier_->OnPacketAbandoned());
+ EXPECT_FALSE(notifier_->OnPacketAbandoned());
+ EXPECT_TRUE(notifier_->OnPacketAbandoned());
+}
+
// Should trigger even after updating sequence numbers and receiving ACKs for
// new sequeunce numbers.
TEST_F(QuicAckNotifierTest, UpdateSeqNums) {
« no previous file with comments | « net/quic/quic_ack_notifier_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698