#include "quiche/quic/core/quic_time_wait_list_manager.h"
#include <cerrno>
#include <memory>
#include <ostream>
#include <tuple>
#include <utility>
#include <vector>
#include "quiche/quic/core/crypto/crypto_protocol.h"
#include "quiche/quic/core/crypto/null_encrypter.h"
#include "quiche/quic/core/crypto/quic_decrypter.h"
#include "quiche/quic/core/crypto/quic_encrypter.h"
#include "quiche/quic/core/quic_connection_id.h"
#include "quiche/quic/core/quic_data_reader.h"
#include "quiche/quic/core/quic_framer.h"
#include "quiche/quic/core/quic_packet_writer.h"
#include "quiche/quic/core/quic_packets.h"
#include "quiche/quic/core/quic_utils.h"
#include "quiche/quic/platform/api/quic_expect_bug.h"
#include "quiche/quic/platform/api/quic_flags.h"
#include "quiche/quic/platform/api/quic_test.h"
#include "quiche/quic/test_tools/mock_quic_session_visitor.h"
#include "quiche/quic/test_tools/quic_test_utils.h"
#include "quiche/quic/test_tools/quic_time_wait_list_manager_peer.h"
_;
Args;
Assign;
DoAll;
Matcher;
NiceMock;
Return;
ReturnPointee;
StrictMock;
Truly;
namespace quic {
namespace test {
namespace {
const size_t kTestPacketSize = …;
class FramerVisitorCapturingPublicReset : public NoOpFramerVisitor { … };
class MockAlarmFactory;
class MockAlarm : public QuicAlarm { … };
class MockAlarmFactory : public QuicAlarmFactory { … };
void MockAlarm::SetImpl() { … }
void MockAlarm::CancelImpl() { … }
class QuicTimeWaitListManagerTest : public QuicTest { … };
bool ValidPublicResetPacketPredicate(
QuicConnectionId expected_connection_id,
const std::tuple<const char*, int>& packet_buffer) { … }
Matcher<const std::tuple<const char*, int>> PublicResetPacketEq(
QuicConnectionId connection_id) { … }
TEST_F(QuicTimeWaitListManagerTest, CheckConnectionIdInTimeWait) { … }
TEST_F(QuicTimeWaitListManagerTest, CheckStatelessConnectionIdInTimeWait) { … }
TEST_F(QuicTimeWaitListManagerTest, SendVersionNegotiationPacket) { … }
TEST_F(QuicTimeWaitListManagerTest,
SendIetfVersionNegotiationPacketWithoutLengthPrefix) { … }
TEST_F(QuicTimeWaitListManagerTest, SendIetfVersionNegotiationPacket) { … }
TEST_F(QuicTimeWaitListManagerTest,
SendIetfVersionNegotiationPacketWithClientConnectionId) { … }
TEST_F(QuicTimeWaitListManagerTest, SendConnectionClose) { … }
TEST_F(QuicTimeWaitListManagerTest, SendTwoConnectionCloses) { … }
TEST_F(QuicTimeWaitListManagerTest, SendPublicReset) { … }
TEST_F(QuicTimeWaitListManagerTest, SendPublicResetWithExponentialBackOff) { … }
TEST_F(QuicTimeWaitListManagerTest, NoPublicResetForStatelessConnections) { … }
TEST_F(QuicTimeWaitListManagerTest, CleanUpOldConnectionIds) { … }
TEST_F(QuicTimeWaitListManagerTest,
CleanUpOldConnectionIdsForMultipleConnectionIdsPerConnection) { … }
TEST_F(QuicTimeWaitListManagerTest, SendQueuedPackets) { … }
TEST_F(QuicTimeWaitListManagerTest, AddConnectionIdTwice) { … }
TEST_F(QuicTimeWaitListManagerTest, ConnectionIdsOrderedByTime) { … }
TEST_F(QuicTimeWaitListManagerTest, MaxConnectionsTest) { … }
TEST_F(QuicTimeWaitListManagerTest, ZeroMaxConnections) { … }
TEST_F(QuicTimeWaitListManagerTest,
SendStatelessResetInResponseToShortHeaders) { … }
TEST_F(QuicTimeWaitListManagerTest,
SendConnectionClosePacketsInResponseToShortHeaders) { … }
TEST_F(QuicTimeWaitListManagerTest,
SendConnectionClosePacketsForMultipleConnectionIds) { … }
TEST_F(QuicTimeWaitListManagerTest, DonotCrashOnNullStatelessReset) { … }
TEST_F(QuicTimeWaitListManagerTest, SendOrQueueNullPacket) { … }
TEST_F(QuicTimeWaitListManagerTest, TooManyPendingPackets) { … }
}
}
}