Index: net/quic/quic_connection_test.cc |
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc |
index 2100368813420ce3cd83ebae1108eabc5849540f..4a71bc1fccd25dc907aec2205fe4ba59a0d553c9 100644 |
--- a/net/quic/quic_connection_test.cc |
+++ b/net/quic/quic_connection_test.cc |
@@ -3746,6 +3746,29 @@ TEST_P(QuicConnectionTest, Pacing) { |
EXPECT_FALSE(server.sent_packet_manager().using_pacing()); |
} |
+TEST_P(QuicConnectionTest, ControlFramesInstigateAcks) { |
+ if (version() < QUIC_VERSION_14) { |
+ return; |
+ } |
+ EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); |
+ |
+ // Send a WINDOW_UPDATE frame. |
+ QuicWindowUpdateFrame window_update; |
+ EXPECT_CALL(visitor_, OnWindowUpdateFrames(_)); |
+ ProcessFramePacket(QuicFrame(&window_update)); |
+ |
+ // Ensure that this has caused the ACK alarm to be set. |
+ QuicAlarm* ack_alarm = QuicConnectionPeer::GetAckAlarm(&connection_); |
+ EXPECT_TRUE(ack_alarm->IsSet()); |
+ |
+ // Cancel alarm, and try again with BLOCKED frame. |
+ ack_alarm->Cancel(); |
+ QuicBlockedFrame blocked; |
+ EXPECT_CALL(visitor_, OnBlockedFrames(_)); |
+ ProcessFramePacket(QuicFrame(&blocked)); |
+ EXPECT_TRUE(ack_alarm->IsSet()); |
+} |
+ |
} // namespace |
} // namespace test |
} // namespace net |