#include "quiche/quic/core/crypto/quic_client_session_cache.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "quiche/quic/platform/api/quic_test.h"
#include "quiche/quic/test_tools/mock_clock.h"
#include "quiche/common/quiche_text_utils.h"
namespace quic {
namespace test {
namespace {
const QuicTime::Delta kTimeout = …;
const QuicVersionLabel kFakeVersionLabel = …;
const QuicVersionLabel kFakeVersionLabel2 = …;
const uint64_t kFakeIdleTimeoutMilliseconds = …;
const uint8_t kFakeStatelessResetTokenData[16] = …;
const uint64_t kFakeMaxPacketSize = …;
const uint64_t kFakeInitialMaxData = …;
const bool kFakeDisableMigration = …;
const auto kCustomParameter1 = …;
const char* kCustomParameter1Value = …;
const auto kCustomParameter2 = …;
const char* kCustomParameter2Value = …;
std::vector<uint8_t> CreateFakeStatelessResetToken() { … }
TransportParameters::LegacyVersionInformation
CreateFakeLegacyVersionInformation() { … }
TransportParameters::VersionInformation CreateFakeVersionInformation() { … }
std::unique_ptr<TransportParameters> MakeFakeTransportParams() { … }
static const char kCachedSession[] = …;
class QuicClientSessionCacheTest : public QuicTest { … };
TEST_F(QuicClientSessionCacheTest, SingleSession) { … }
TEST_F(QuicClientSessionCacheTest, MultipleSessions) { … }
TEST_F(QuicClientSessionCacheTest, DifferentTransportParams) { … }
TEST_F(QuicClientSessionCacheTest, DifferentApplicationState) { … }
TEST_F(QuicClientSessionCacheTest, BothStatesDifferent) { … }
TEST_F(QuicClientSessionCacheTest, SizeLimit) { … }
TEST_F(QuicClientSessionCacheTest, ClearEarlyData) { … }
TEST_F(QuicClientSessionCacheTest, Expiration) { … }
TEST_F(QuicClientSessionCacheTest, RemoveExpiredEntriesAndClear) { … }
}
}
}