Index: net/tools/quic/quic_time_wait_list_manager_test.cc |
diff --git a/net/tools/quic/quic_time_wait_list_manager_test.cc b/net/tools/quic/quic_time_wait_list_manager_test.cc |
index 865a6ff2ab4f9f2e1d38edf4ef940b5a17ae9276..6eda545e06864faf998ea201135c49358be250e7 100644 |
--- a/net/tools/quic/quic_time_wait_list_manager_test.cc |
+++ b/net/tools/quic/quic_time_wait_list_manager_test.cc |
@@ -218,6 +218,21 @@ TEST_F(QuicTimeWaitListManagerTest, CheckStatelessConnectionIdInTimeWait) { |
EXPECT_TRUE(IsConnectionIdInTimeWait(connection_id_)); |
} |
+TEST_F(QuicTimeWaitListManagerTest, SendVersionNegotiationPacket) { |
+ scoped_ptr<QuicEncryptedPacket> packet( |
+ QuicFramer::BuildVersionNegotiationPacket(connection_id_, |
+ QuicSupportedVersions())); |
+ EXPECT_CALL(writer_, WritePacket(_, packet->length(), |
+ server_address_.address().bytes(), |
+ client_address_, _)) |
+ .WillOnce(Return(WriteResult(WRITE_STATUS_OK, 1))); |
+ |
+ time_wait_list_manager_.SendVersionNegotiationPacket( |
+ connection_id_, QuicSupportedVersions(), server_address_, |
+ client_address_); |
+ EXPECT_EQ(0u, time_wait_list_manager_.num_connections()); |
+} |
+ |
TEST_F(QuicTimeWaitListManagerTest, SendConnectionClose) { |
const size_t kConnectionCloseLength = 100; |
EXPECT_CALL(visitor_, OnConnectionAddedToTimeWaitList(connection_id_)); |