#include "net/socket/tcp_stream_attempt.h"
#include <optional>
#include <string_view>
#include "base/functional/callback_forward.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/log/net_log_capture_mode.h"
#include "net/log/net_log_entry.h"
#include "net/socket/socket_performance_watcher.h"
#include "net/socket/socket_performance_watcher_factory.h"
#include "net/socket/stream_attempt.h"
#include "net/socket/transport_client_socket_pool_test_util.h"
#include "net/test/gtest_util.h"
#include "net/test/test_with_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
IsError;
IsOk;
namespace net {
namespace {
IPEndPoint MakeIPEndPoint(std::string_view ip_literal, uint16_t port = 80) { … }
class NetLogObserver : public NetLog::ThreadSafeObserver { … };
class TestSocketPerformanceWatcher : public SocketPerformanceWatcher { … };
class TestSocketPerformanceWatcherFactory
: public SocketPerformanceWatcherFactory { … };
class StreamAttemptHelper { … };
}
class TcpStreamAttemptTest : public TestWithTaskEnvironment { … };
TEST_F(TcpStreamAttemptTest, SuccessSync) { … }
TEST_F(TcpStreamAttemptTest, SuccessAsync) { … }
TEST_F(TcpStreamAttemptTest, FailureSync) { … }
TEST_F(TcpStreamAttemptTest, FailureAsync) { … }
TEST_F(TcpStreamAttemptTest, Timeout) { … }
TEST_F(TcpStreamAttemptTest, Abort) { … }
TEST_F(TcpStreamAttemptTest, SocketPerformanceWatcher) { … }
}