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

Unified Diff: net/tools/quic/quic_time_wait_list_manager_test.cc

Issue 1761253002: Make QUIC version negotiation stateless. The QUIC dispatcher now detects version mismatch before cr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115591435
Patch Set: Update dependency Created 4 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
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 96078478bdc9f80fdf899603baabbc57b2e60378..12cb7fbbdb436d8cb8b10833de274445bb08b55d 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(),
+ 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_));
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager.cc ('k') | net/tools/quic/test_tools/mock_quic_time_wait_list_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698