#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/quic/quic_session_pool.h"
#include <sys/types.h>
#include <memory>
#include <ostream>
#include <set>
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "net/base/features.h"
#include "net/base/host_port_pair.h"
#include "net/base/http_user_agent_settings.h"
#include "net/base/load_flags.h"
#include "net/base/mock_network_change_notifier.h"
#include "net/base/net_error_details.h"
#include "net/base/net_errors.h"
#include "net/base/network_anonymization_key.h"
#include "net/base/proxy_chain.h"
#include "net/base/proxy_server.h"
#include "net/base/schemeful_site.h"
#include "net/base/session_usage.h"
#include "net/base/test_proxy_delegate.h"
#include "net/cert/mock_cert_verifier.h"
#include "net/dns/mock_host_resolver.h"
#include "net/dns/public/dns_query_type.h"
#include "net/dns/public/host_resolver_source.h"
#include "net/dns/public/secure_dns_policy.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
#include "net/http/http_server_properties.h"
#include "net/http/http_util.h"
#include "net/http/transport_security_state.h"
#include "net/http/transport_security_state_test_util.h"
#include "net/quic/address_utils.h"
#include "net/quic/crypto/proof_verifier_chromium.h"
#include "net/quic/mock_crypto_client_stream_factory.h"
#include "net/quic/mock_quic_context.h"
#include "net/quic/mock_quic_data.h"
#include "net/quic/properties_based_quic_server_info.h"
#include "net/quic/quic_chromium_alarm_factory.h"
#include "net/quic/quic_chromium_client_session.h"
#include "net/quic/quic_chromium_client_session_peer.h"
#include "net/quic/quic_context.h"
#include "net/quic/quic_http_stream.h"
#include "net/quic/quic_http_utils.h"
#include "net/quic/quic_server_info.h"
#include "net/quic/quic_session_alias_key.h"
#include "net/quic/quic_session_key.h"
#include "net/quic/quic_session_pool_peer.h"
#include "net/quic/quic_session_pool_test_base.h"
#include "net/quic/quic_socket_data_provider.h"
#include "net/quic/quic_test_packet_maker.h"
#include "net/quic/quic_test_packet_printer.h"
#include "net/quic/test_task_runner.h"
#include "net/socket/next_proto.h"
#include "net/socket/socket_tag.h"
#include "net/socket/socket_test_util.h"
#include "net/spdy/spdy_session_test_util.h"
#include "net/spdy/spdy_test_util_common.h"
#include "net/ssl/test_ssl_config_service.h"
#include "net/test/cert_test_util.h"
#include "net/test/gtest_util.h"
#include "net/test/test_data_directory.h"
#include "net/test/test_with_task_environment.h"
#include "net/third_party/quiche/src/quiche/common/http/http_header_block.h"
#include "net/third_party/quiche/src/quiche/common/quiche_data_writer.h"
#include "net/third_party/quiche/src/quiche/http2/test_tools/spdy_test_utils.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/crypto_handshake.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/quic_crypto_client_config.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/quic_decrypter.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/quic_encrypter.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_constants.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_utils.h"
#include "net/third_party/quiche/src/quiche/quic/platform/api/quic_test.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/mock_clock.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/mock_random.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_config_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_connection_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_path_validator_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_session_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_spdy_session_peer.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/quic_test_utils.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/static_http_user_agent_settings.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/scheme_host_port.h"
#include "url/url_constants.h"
string;
namespace net::test {
class QuicHttpStreamPeer { … };
namespace {
struct TestParams { … };
std::string PrintToString(const TestParams& p) { … }
std::vector<TestParams> GetTestParams() { … }
class SessionAttemptHelper : public QuicSessionAttempt::Delegate { … };
}
class TestConnectionMigrationSocketFactory : public MockClientSocketFactory { … };
class TestPortMigrationSocketFactory : public MockClientSocketFactory { … };
class MockQuicSessionPool : public QuicSessionPool { … };
class QuicSessionPoolTest : public QuicSessionPoolTestBase,
public ::testing::TestWithParam<TestParams> { … };
void QuicSessionPoolTest::RunTestLoopUntilIdle() { … }
void QuicSessionPoolTest::InitializeConnectionMigrationV2Test(
NetworkChangeNotifier::NetworkList connected_networks) { … }
void QuicSessionPoolTest::VerifyServerMigration(const quic::QuicConfig& config,
IPEndPoint expected_address) { … }
void QuicSessionPoolTest::VerifyInitialization(
bool vary_network_anonymization_key) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(QuicSessionPoolTest, CreateSyncQuicSession) { … }
TEST_P(QuicSessionPoolTest, CreateAsyncQuicSession) { … }
TEST_P(QuicSessionPoolTest, SyncCreateZeroRtt) { … }
TEST_P(QuicSessionPoolTest, AsyncCreateZeroRtt) { … }
TEST_P(QuicSessionPoolTest, AsyncZeroRtt) { … }
TEST_P(QuicSessionPoolTest, DefaultInitialRtt) { … }
TEST_P(QuicSessionPoolTest, FactoryDestroyedWhenJobPending) { … }
TEST_P(QuicSessionPoolTest, RequireConfirmation) { … }
TEST_P(QuicSessionPoolTest, RequireConfirmationAsyncQuicSession) { … }
TEST_P(QuicSessionPoolTest, DontRequireConfirmationFromSameIP) { … }
TEST_P(QuicSessionPoolTest, CachedInitialRtt) { … }
TEST_P(QuicSessionPoolTest, CachedInitialRttWithNetworkAnonymizationKey) { … }
TEST_P(QuicSessionPoolTest, 2gInitialRtt) { … }
TEST_P(QuicSessionPoolTest, 3gInitialRtt) { … }
TEST_P(QuicSessionPoolTest, GoAway) { … }
TEST_P(QuicSessionPoolTest, ServerNetworkStatsWithNetworkAnonymizationKey) { … }
TEST_P(QuicSessionPoolTest, PooledWithDifferentIpSession) { … }
TEST_P(QuicSessionPoolTest, PoolingSkipDns) { … }
TEST_P(QuicSessionPoolTest, Pooling) { … }
TEST_P(QuicSessionPoolTest, PoolingWithServerMigration) { … }
TEST_P(QuicSessionPoolTest, NoPoolingAfterGoAway) { … }
TEST_P(QuicSessionPoolTest, HttpsPooling) { … }
TEST_P(QuicSessionPoolTest, HttpsPoolingWithMatchingPins) { … }
TEST_P(QuicSessionPoolTest, NoHttpsPoolingWithDifferentPins) { … }
TEST_P(QuicSessionPoolTest, Goaway) { … }
TEST_P(QuicSessionPoolTest, MaxOpenStream) { … }
TEST_P(QuicSessionPoolTest, ResolutionErrorInCreate) { … }
TEST_P(QuicSessionPoolTest, SyncConnectErrorInCreate) { … }
TEST_P(QuicSessionPoolTest, AsyncConnectErrorInCreate) { … }
TEST_P(QuicSessionPoolTest, SyncCancelCreate) { … }
TEST_P(QuicSessionPoolTest, AsyncCancelCreate) { … }
TEST_P(QuicSessionPoolTest, CloseAllSessions) { … }
TEST_P(QuicSessionPoolTest,
WriteErrorInCryptoConnectWithAsyncHostResolutionSyncSessionCreation) { … }
TEST_P(QuicSessionPoolTest,
WriteErrorInCryptoConnectWithAsyncHostResolutionAsyncSessionCreation) { … }
TEST_P(QuicSessionPoolTest,
WriteErrorInCryptoConnectWithSyncHostResolutionSyncQuicSession) { … }
TEST_P(QuicSessionPoolTest,
WriteErrorInCryptoConnectWithSyncHostResolutionAsyncQuicSession) { … }
TEST_P(QuicSessionPoolTest, CloseSessionDuringCreation) { … }
TEST_P(QuicSessionPoolTest, CloseSessionsOnIPAddressChanged) { … }
TEST_P(QuicSessionPoolTest, GoAwaySessionsOnIPAddressChanged) { … }
TEST_P(QuicSessionPoolTest, OnIPAddressChangedWithConnectionMigration) { … }
TEST_P(QuicSessionPoolTest, MigrateOnNetworkMadeDefaultWithSynchronousWrite) { … }
TEST_P(QuicSessionPoolTest, MigrateOnNetworkMadeDefaultWithAsyncWrite) { … }
void QuicSessionPoolTest::TestMigrationOnNetworkMadeDefault(IoMode write_mode) { … }
TEST_P(QuicSessionPoolTest, MigratedToBlockedSocketAfterProbing) { … }
TEST_P(QuicSessionPoolTest, MigrationTimeoutWithNoNewNetwork) { … }
TEST_P(QuicSessionPoolTest,
OnNetworkMadeDefaultNonMigratableStream_MigrateIdleSessions) { … }
TEST_P(QuicSessionPoolTest,
OnNetworkMadeDefaultNonMigratableStream_DoNotMigrateIdleSessions) { … }
void QuicSessionPoolTest::TestOnNetworkMadeDefaultNonMigratableStream(
bool migrate_idle_sessions) { … }
TEST_P(QuicSessionPoolTest, OnNetworkMadeDefaultConnectionMigrationDisabled) { … }
TEST_P(QuicSessionPoolTest,
OnNetworkDisconnectedNonMigratableStream_DoNotMigrateIdleSessions) { … }
TEST_P(QuicSessionPoolTest,
OnNetworkDisconnectedNonMigratableStream_MigrateIdleSessions) { … }
void QuicSessionPoolTest::TestOnNetworkDisconnectedNonMigratableStream(
bool migrate_idle_sessions) { … }
TEST_P(QuicSessionPoolTest, OnNetworkDisconnectedConnectionMigrationDisabled) { … }
TEST_P(QuicSessionPoolTest,
OnNetworkMadeDefaultNoOpenStreams_DoNotMigrateIdleSessions) { … }
TEST_P(QuicSessionPoolTest,
OnNetworkMadeDefaultNoOpenStreams_MigrateIdleSessions) { … }
void QuicSessionPoolTest::TestOnNetworkMadeDefaultNoOpenStreams(
bool migrate_idle_sessions) { … }
TEST_P(QuicSessionPoolTest,
OnNetworkDisconnectedNoOpenStreams_DoNotMigateIdleSessions) { … }
TEST_P(QuicSessionPoolTest,
OnNetworkDisconnectedNoOpenStreams_MigateIdleSessions) { … }
void QuicSessionPoolTest::TestOnNetworkDisconnectedNoOpenStreams(
bool migrate_idle_sessions) { … }
TEST_P(QuicSessionPoolTest, MigrateOnDefaultNetworkDisconnectedSync) { … }
TEST_P(QuicSessionPoolTest, MigrateOnDefaultNetworkDisconnectedAsync) { … }
void QuicSessionPoolTest::TestMigrationOnNetworkDisconnected(
bool async_write_before) { … }
TEST_P(QuicSessionPoolTest,
MigrateOnDefaultNetworkDisconnectedWithProxiedSession) { … }
TEST_P(QuicSessionPoolTest, MigrateOnPathDegradingWithProxiedSession) { … }
TEST_P(QuicSessionPoolTest, NewNetworkConnectedAfterNoNetwork) { … }
TEST_P(QuicSessionPoolTest, MigrateToProbingSocket) { … }
TEST_P(QuicSessionPoolTest, MigrateEarlyOnPathDegradingAsync) { … }
TEST_P(QuicSessionPoolTest, MigrateEarlyOnPathDegradingSync) { … }
void QuicSessionPoolTest::TestMigrationOnPathDegrading(
bool async_write_before) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionEarlyProbingWriterError) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionEarlyProbingWriterErrorThreeNetworks) { … }
TEST_P(QuicSessionPoolTest, MultiPortSessionWithMigration) { … }
TEST_P(QuicSessionPoolTest, SuccessfullyMigratedToServerPreferredAddress) { … }
TEST_P(QuicSessionPoolTest, FailedToValidateServerPreferredAddress) { … }
TEST_P(QuicSessionPoolTest,
MigratePortOnPathDegrading_WithoutNetworkHandle_PathValidator) { … }
TEST_P(QuicSessionPoolTest, PortMigrationDisabledOnPathDegrading) { … }
TEST_P(QuicSessionPoolTest,
PortMigrationProbingReceivedStatelessReset_PathValidator) { … }
TEST_P(QuicSessionPoolTest,
MigratePortOnPathDegrading_WithNetworkHandle_PathValidator) { … }
TEST_P(QuicSessionPoolTest,
MigratePortOnPathDegrading_WithMigration_PathValidator) { … }
TEST_P(
QuicSessionPoolTest,
TestPostNetworkOnMadeDefaultWhileConnectionMigrationFailOnUnexpectedErrorTwoDifferentSessions) { … }
TEST_P(QuicSessionPoolTest,
TestPostNetworkMadeDefaultWhileConnectionMigrationFailBeforeHandshake) { … }
TEST_P(
QuicSessionPoolTest,
TestPostNetworkOnMadeDefaultWhileConnectionMigrationFailOnNoActiveStreams) { … }
TEST_P(
QuicSessionPoolTest,
TestPostNetworkOnMadeDefaultWhileConnectionMigrationFailOnUnexpectedError) { … }
TEST_P(QuicSessionPoolTest,
TestPostNetworkOnMadeDefaultWhileConnectionMigrationIsFailing) { … }
TEST_P(QuicSessionPoolTest,
TestCloseSessionOnErrorLaterThenConnectionMigrationMigrateToSocket) { … }
TEST_P(QuicSessionPoolTest,
TestCloseSessionOnErrorLaterThenConnectionMigrationMigrate) { … }
void QuicSessionPoolTest::
TestThatBlackHoleIsDisabledOnNoNewNetworkThenResumedAfterConnectingToANetwork(
bool is_blackhole_disabled_after_disconnecting) { … }
TEST_P(
QuicSessionPoolTest,
VerifyThatBlackHoleIsDisabledOnNoAvailableNetworkThenResumedAfterConnectingToNewNetwork_FeatureDisabled) { … }
TEST_P(
QuicSessionPoolTest,
VerifyThatBlackHoleIsDisabledOnNoAvailableNetworkThenResumedAfterConnectingToNewNetwork_FeatureEnabled) { … }
void QuicSessionPoolTest::TestSimplePortMigrationOnPathDegrading() { … }
TEST_P(QuicSessionPoolTest, MultiplePortMigrationsExceedsMaxLimit_iQUICStyle) { … }
TEST_P(QuicSessionPoolTest,
MigratePortOnPathDegrading_MigrateIdleSession_PathValidator) { … }
TEST_P(QuicSessionPoolTest, DoNotMigrateToBadSocketOnPathDegrading) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionWithDrainingStreamSync) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionWithDrainingStreamAsync) { … }
void QuicSessionPoolTest::TestMigrateSessionWithDrainingStream(
IoMode write_mode_for_queued_packet) { … }
TEST_P(QuicSessionPoolTest, MigrateOnNewNetworkConnectAfterPathDegrading) { … }
TEST_P(QuicSessionPoolTest,
MigrateMultipleSessionsToBadSocketsAfterDisconnected) { … }
TEST_P(QuicSessionPoolTest, MigrateOnPathDegradingWithNoNewNetwork) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionEarlyNonMigratableStream_DoNotMigrateIdleSessions) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionEarlyNonMigratableStream_MigrateIdleSessions) { … }
void QuicSessionPoolTest::TestMigrateSessionEarlyNonMigratableStream(
bool migrate_idle_sessions) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionEarlyConnectionMigrationDisabled) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnAsyncWriteError) { … }
TEST_P(QuicSessionPoolTest, MigrateBackToDefaultPostMigrationOnWriteError) { … }
TEST_P(QuicSessionPoolTest,
NoMigrationOnPathDegradingBeforeHandshakeConfirmed) { … }
TEST_P(QuicSessionPoolTest, NoAlternateNetworkBeforeHandshakeOnIdleTimeout) { … }
TEST_P(QuicSessionPoolTest, NoAlternateNetworkOnHandshakeTimeout) { … }
void QuicSessionPoolTest::TestNoAlternateNetworkBeforeHandshake(
quic::QuicErrorCode quic_error) { … }
TEST_P(QuicSessionPoolTest, NewConnectionBeforeHandshakeAfterIdleTimeout) { … }
TEST_P(QuicSessionPoolTest, NewConnectionAfterHandshakeTimeout) { … }
void QuicSessionPoolTest::TestNewConnectionOnAlternateNetworkBeforeHandshake(
quic::QuicErrorCode quic_error) { … }
TEST_P(QuicSessionPoolTest, MigrationOnWriteErrorBeforeHandshakeConfirmed) { … }
TEST_P(QuicSessionPoolTest,
RetryConnectionOnWriteErrorBeforeHandshakeConfirmed) { … }
void QuicSessionPoolTest::TestMigrationOnWriteError(IoMode write_error_mode) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnWriteErrorSynchronous) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnWriteErrorAsync) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorNoNewNetwork(
IoMode write_error_mode) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnWriteErrorNoNewNetworkSynchronous) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnWriteErrorNoNewNetworkAsync) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorWithMultipleRequestsSync) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorWithMultipleRequestsAsync) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorWithMultipleRequests(
IoMode write_error_mode) { … }
TEST_P(QuicSessionPoolTest, MigrateOnWriteErrorWithMixedRequestsSync) { … }
TEST_P(QuicSessionPoolTest, MigrateOnWriteErrorWithMixedRequestsAsync) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorMixedStreams(
IoMode write_error_mode) { … }
TEST_P(QuicSessionPoolTest, MigrateOnWriteErrorWithMixedRequests2Sync) { … }
TEST_P(QuicSessionPoolTest, MigrateOnWriteErrorWithMixedRequests2Async) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorMixedStreams2(
IoMode write_error_mode) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorNonMigratableStream(
IoMode write_error_mode,
bool migrate_idle_sessions) { … }
TEST_P(
QuicSessionPoolTest,
MigrateSessionOnWriteErrorNonMigratableStreamSync_DoNotMigrateIdleSessions) { … }
TEST_P(
QuicSessionPoolTest,
MigrateSessionOnWriteErrorNonMigratableStreamAsync_DoNotMigrateIdleSessions) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorNonMigratableStreamSync_MigrateIdleSessions) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorNonMigratableStreamAsync_MigrateIdleSessions) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorMigrationDisabled(
IoMode write_error_mode) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorMigrationDisabledSynchronous) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnWriteErrorMigrationDisabledAsync) { … }
void QuicSessionPoolTest::TestMigrationOnMultipleWriteErrors(
IoMode write_error_mode_on_old_network,
IoMode write_error_mode_on_new_network) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnMultipleWriteErrorsSyncSync) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnMultipleWriteErrorsSyncAsync) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnMultipleWriteErrorsAsyncSync) { … }
TEST_P(QuicSessionPoolTest, MigrateSessionOnMultipleWriteErrorsAsyncAsync) { … }
TEST_P(QuicSessionPoolTest, NoMigrationBeforeHandshakeOnNetworkDisconnected) { … }
void QuicSessionPoolTest::
TestMigrationOnNetworkNotificationWithWriteErrorQueuedLater(
bool disconnected) { … }
TEST_P(QuicSessionPoolTest,
MigrateOnNetworkDisconnectedWithWriteErrorQueuedLater) { … }
TEST_P(QuicSessionPoolTest,
MigrateOnWriteErrorWithNetworkMadeDefaultQueuedEarlier) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorWithNotificationQueuedLater(
bool disconnected) { … }
TEST_P(QuicSessionPoolTest,
MigrateOnWriteErrorWithNetworkMadeDefaultQueuedLater) { … }
TEST_P(QuicSessionPoolTest,
MigrateOnWriteErrorWithNetworkDisconnectedQueuedLater) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorPauseBeforeConnected(
IoMode write_error_mode) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnSyncWriteErrorPauseBeforeConnected) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnAsyncWriteErrorPauseBeforeConnected) { … }
TEST_P(QuicSessionPoolTest, IgnoreWriteErrorFromOldWriterAfterMigration) { … }
TEST_P(QuicSessionPoolTest, IgnoreReadErrorFromOldReaderAfterMigration) { … }
TEST_P(QuicSessionPoolTest, IgnoreReadErrorOnOldReaderDuringMigration) { … }
TEST_P(QuicSessionPoolTest, DefaultRetransmittableOnWireTimeoutForMigration) { … }
TEST_P(QuicSessionPoolTest, CustomRetransmittableOnWireTimeoutForMigration) { … }
TEST_P(QuicSessionPoolTest, CustomRetransmittableOnWireTimeout) { … }
TEST_P(QuicSessionPoolTest, NoRetransmittableOnWireTimeout) { … }
TEST_P(QuicSessionPoolTest,
CustomRetransmittableOnWireTimeoutWithMigrationOnNetworkChangeOnly) { … }
TEST_P(QuicSessionPoolTest,
NoRetransmittableOnWireTimeoutWithMigrationOnNetworkChangeOnly) { … }
TEST_P(QuicSessionPoolTest,
IgnoreReadErrorOnOldReaderDuringPendingMigrationOnWriteError) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorWithDisconnectAfterConnectAsync) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorWithDisconnectAfterConnectSync) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorWithDisconnectBeforeConnectAsync) { … }
TEST_P(QuicSessionPoolTest,
MigrateSessionOnWriteErrorWithDisconnectBeforeConnectSync) { … }
void QuicSessionPoolTest::TestMigrationOnWriteErrorWithMultipleNotifications(
IoMode write_error_mode,
bool disconnect_before_connect) { … }
TEST_P(QuicSessionPoolTest, DefaultIdleMigrationPeriod) { … }
TEST_P(QuicSessionPoolTest, CustomIdleMigrationPeriod) { … }
TEST_P(QuicSessionPoolTest, ServerMigration) { … }
TEST_P(QuicSessionPoolTest, ServerMigrationNonMigratableStream) { … }
TEST_P(QuicSessionPoolTest, ServerMigrationIPv4ToIPv4) { … }
TEST_P(QuicSessionPoolTest, ServerMigrationIPv6ToIPv6) { … }
TEST_P(QuicSessionPoolTest, ServerMigrationIPv6ToIPv4Fails) { … }
TEST_P(QuicSessionPoolTest, ServerMigrationIPv4ToIPv6Fails) { … }
TEST_P(QuicSessionPoolTest, OnCertDBChanged) { … }
TEST_P(QuicSessionPoolTest, OnCertVerifierChanged) { … }
TEST_P(QuicSessionPoolTest, SharedCryptoConfig) { … }
TEST_P(QuicSessionPoolTest, CryptoConfigWhenProofIsInvalid) { … }
TEST_P(QuicSessionPoolTest, EnableNotLoadFromDiskCache) { … }
TEST_P(QuicSessionPoolTest, ReducePingTimeoutOnConnectionTimeOutOpenStreams) { … }
TEST_P(QuicSessionPoolTest, MaybeInitialize) { … }
TEST_P(QuicSessionPoolTest, MaybeInitializeWithNetworkAnonymizationKey) { … }
TEST_P(QuicSessionPoolTest, CryptoConfigCache) { … }
TEST_P(QuicSessionPoolTest, CryptoConfigCacheWithNetworkAnonymizationKey) { … }
TEST_P(QuicSessionPoolTest, CryptoConfigCacheMRUWithNetworkAnonymizationKey) { … }
TEST_P(QuicSessionPoolTest,
CryptoConfigCacheMRUWithRealRequestsAndWithNetworkAnonymizationKey) { … }
TEST_P(QuicSessionPoolTest, YieldAfterPackets) { … }
TEST_P(QuicSessionPoolTest, YieldAfterDuration) { … }
TEST_P(QuicSessionPoolTest, PoolByOrigin) { … }
namespace {
enum DestinationType { … };
struct PoolingTestParams { … };
std::string PrintToString(const PoolingTestParams& p) { … }
std::vector<PoolingTestParams> GetPoolingTestParams() { … }
}
class QuicSessionPoolWithDestinationTest
: public QuicSessionPoolTestBase,
public ::testing::TestWithParam<PoolingTestParams> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(QuicSessionPoolWithDestinationTest, InvalidCertificate) { … }
TEST_P(QuicSessionPoolWithDestinationTest, SharedCertificate) { … }
TEST_P(QuicSessionPoolWithDestinationTest, DifferentPrivacyMode) { … }
TEST_P(QuicSessionPoolWithDestinationTest, DifferentSecureDnsPolicy) { … }
TEST_P(QuicSessionPoolWithDestinationTest, DifferentProxyChain) { … }
TEST_P(QuicSessionPoolWithDestinationTest, DifferentSessionUsage) { … }
TEST_P(QuicSessionPoolWithDestinationTest, DisjointCertificate) { … }
TEST_P(QuicSessionPoolTest, ClearCachedStatesInCryptoConfig) { … }
TEST_P(QuicSessionPoolTest, ConfigConnectionOptions) { … }
TEST_P(QuicSessionPoolTest, HostResolverUsesRequestPriority) { … }
TEST_P(QuicSessionPoolTest, HostResolverRequestReprioritizedOnSetPriority) { … }
TEST_P(QuicSessionPoolTest, HostResolverUsesParams) { … }
TEST_P(QuicSessionPoolTest, ConfigMaxTimeBeforeCryptoHandshake) { … }
TEST_P(QuicSessionPoolTest, ResultAfterQuicSessionCreationCallbackFail) { … }
TEST_P(QuicSessionPoolTest, ResultAfterQuicSessionCreationCallbackSuccessSync) { … }
TEST_P(QuicSessionPoolTest,
ResultAfterQuicSessionCreationCallbackSuccessAsync) { … }
TEST_P(QuicSessionPoolTest, ResultAfterHostResolutionCallbackAsyncSync) { … }
TEST_P(QuicSessionPoolTest, ResultAfterHostResolutionCallbackAsyncAsync) { … }
TEST_P(QuicSessionPoolTest, ResultAfterHostResolutionCallbackSyncSync) { … }
TEST_P(QuicSessionPoolTest, ResultAfterHostResolutionCallbackSyncAsync) { … }
TEST_P(QuicSessionPoolTest, ResultAfterHostResolutionCallbackFailSync) { … }
TEST_P(QuicSessionPoolTest, ResultAfterHostResolutionCallbackFailAsync) { … }
TEST_P(QuicSessionPoolTest, Tag) { … }
TEST_P(QuicSessionPoolTest, ReadErrorClosesConnection) { … }
TEST_P(QuicSessionPoolTest, MessageTooBigReadErrorDoesNotCloseConnection) { … }
TEST_P(QuicSessionPoolTest, ZeroLengthReadDoesNotCloseConnection) { … }
TEST_P(QuicSessionPoolTest, DnsAliasesCanBeAccessedFromStream) { … }
TEST_P(QuicSessionPoolTest, NoAdditionalDnsAliases) { … }
TEST_P(QuicSessionPoolTest, DoNotUseDnsAliases) { … }
TEST_P(QuicSessionPoolTest, ConnectErrorInCreateWithDnsAliases) { … }
TEST_P(QuicSessionPoolTest, RequireDnsHttpsAlpnNoHttpsRecord) { … }
TEST_P(QuicSessionPoolTest, RequireDnsHttpsAlpnMatch) { … }
TEST_P(QuicSessionPoolTest, RequireDnsHttpsAlpnUnknownAlpn) { … }
TEST_P(QuicSessionPoolTest, RequireDnsHttpsAlpnUnknownAndSupportedAlpn) { … }
TEST_P(QuicSessionPoolTest, RequireDnsHttpsNotAlpnName) { … }
TEST_P(QuicSessionPoolTest, RequireDnsHttpsRecordOnly) { … }
void QuicSessionPoolTest::TestRequireDnsHttpsAlpn(
std::vector<HostResolverEndpointResult> endpoints,
bool expect_success) { … }
namespace {
struct DnsAliasPoolingTestParams { … };
std::string PrintToString(const std::set<std::string>& set) { … }
std::string PrintToString(const DnsAliasPoolingTestParams& p) { … }
std::vector<DnsAliasPoolingTestParams> GetDnsAliasPoolingTestParams() { … }
}
class QuicSessionPoolDnsAliasPoolingTest
: public QuicSessionPoolTestBase,
public ::testing::TestWithParam<DnsAliasPoolingTestParams> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(QuicSessionPoolDnsAliasPoolingTest, IPPooling) { … }
TEST_P(QuicSessionPoolTest, EchGrease) { … }
TEST_P(QuicSessionPoolTest, EchWithQuicFromAltSvc) { … }
TEST_P(QuicSessionPoolTest, EchWithQuicFromHttpsRecord) { … }
TEST_P(QuicSessionPoolTest, EchDisabled) { … }
TEST_P(QuicSessionPoolTest, EchSvcbReliant) { … }
TEST_P(QuicSessionPoolTest, EchDisabledSvcbOptional) { … }
TEST_P(QuicSessionPoolTest, CreateSessionAttempt) { … }
}