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

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

Issue 2846003002: Deprecate FLAGS_quic_reloadable_flag_quic_remove_packet_number_from_public_reset. (Closed)
Patch Set: remove the deprecated flag Created 3 years, 8 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/tools/quic/quic_time_wait_list_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 96d74d0debcd994539b442c6c8d5386a43743cfd..b1bcf26c35e7a6dbfc134a535386b07b75879bf3 100644
--- a/net/tools/quic/quic_time_wait_list_manager_test.cc
+++ b/net/tools/quic/quic_time_wait_list_manager_test.cc
@@ -144,9 +144,8 @@ class QuicTimeWaitListManagerTest : public ::testing::Test {
class ValidatePublicResetPacketPredicate
: public MatcherInterface<const std::tr1::tuple<const char*, int>> {
public:
- explicit ValidatePublicResetPacketPredicate(QuicConnectionId connection_id,
- QuicPacketNumber number)
- : connection_id_(connection_id), packet_number_(number) {}
+ explicit ValidatePublicResetPacketPredicate(QuicConnectionId connection_id)
+ : connection_id_(connection_id) {}
bool MatchAndExplain(
const std::tr1::tuple<const char*, int> packet_buffer,
@@ -163,7 +162,6 @@ class ValidatePublicResetPacketPredicate
packet.public_header.connection_id) &&
packet.public_header.reset_flag &&
!packet.public_header.version_flag &&
- packet_number_ == packet.rejected_packet_number &&
net::test::TestPeerIPAddress() == packet.client_address.host() &&
kTestPort == packet.client_address.port();
}
@@ -174,14 +172,11 @@ class ValidatePublicResetPacketPredicate
private:
QuicConnectionId connection_id_;
- QuicPacketNumber packet_number_;
};
Matcher<const std::tr1::tuple<const char*, int>> PublicResetPacketEq(
- QuicConnectionId connection_id,
- QuicPacketNumber packet_number) {
- return MakeMatcher(
- new ValidatePublicResetPacketPredicate(connection_id, packet_number));
+ QuicConnectionId connection_id) {
+ return MakeMatcher(new ValidatePublicResetPacketPredicate(connection_id));
}
TEST_F(QuicTimeWaitListManagerTest, CheckConnectionIdInTimeWait) {
@@ -259,7 +254,7 @@ TEST_F(QuicTimeWaitListManagerTest, SendPublicReset) {
const int kRandomSequenceNumber = 1;
EXPECT_CALL(writer_,
WritePacket(_, _, server_address_.host(), client_address_, _))
- .With(Args<0, 1>(PublicResetPacketEq(connection_id_, 0)))
+ .With(Args<0, 1>(PublicResetPacketEq(connection_id_)))
.WillOnce(Return(WriteResult(WRITE_STATUS_OK, 0)));
ProcessPacket(connection_id_, kRandomSequenceNumber);
@@ -354,14 +349,14 @@ TEST_F(QuicTimeWaitListManagerTest, SendQueuedPackets) {
// Let first write through.
EXPECT_CALL(writer_,
WritePacket(_, _, server_address_.host(), client_address_, _))
- .With(Args<0, 1>(PublicResetPacketEq(connection_id, 0)))
+ .With(Args<0, 1>(PublicResetPacketEq(connection_id)))
.WillOnce(Return(WriteResult(WRITE_STATUS_OK, packet->length())));
ProcessPacket(connection_id, packet_number);
// write block for the next packet.
EXPECT_CALL(writer_,
WritePacket(_, _, server_address_.host(), client_address_, _))
- .With(Args<0, 1>(PublicResetPacketEq(connection_id, 0)))
+ .With(Args<0, 1>(PublicResetPacketEq(connection_id)))
.WillOnce(DoAll(Assign(&writer_is_blocked_, true),
Return(WriteResult(WRITE_STATUS_BLOCKED, EAGAIN))));
EXPECT_CALL(visitor_, OnWriteBlocked(&time_wait_list_manager_));
@@ -386,11 +381,11 @@ TEST_F(QuicTimeWaitListManagerTest, SendQueuedPackets) {
writer_is_blocked_ = false;
EXPECT_CALL(writer_,
WritePacket(_, _, server_address_.host(), client_address_, _))
- .With(Args<0, 1>(PublicResetPacketEq(connection_id, 0)))
+ .With(Args<0, 1>(PublicResetPacketEq(connection_id)))
.WillOnce(Return(WriteResult(WRITE_STATUS_OK, packet->length())));
EXPECT_CALL(writer_,
WritePacket(_, _, server_address_.host(), client_address_, _))
- .With(Args<0, 1>(PublicResetPacketEq(other_connection_id, 0)))
+ .With(Args<0, 1>(PublicResetPacketEq(other_connection_id)))
.WillOnce(Return(WriteResult(WRITE_STATUS_OK, other_packet->length())));
time_wait_list_manager_.OnCanWrite();
}
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698