| 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();
|
| }
|
|
|