#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "services/network/p2p/socket_tcp.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string_view>
#include "base/containers/span.h"
#include "base/memory/raw_ptr.h"
#include "base/numerics/byte_conversions.h"
#include "base/numerics/safe_conversions.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/webrtc/fake_ssl_client_socket.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/base/features.h"
#include "net/base/network_anonymization_key.h"
#include "net/dns/mock_host_resolver.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/stream_socket.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "net/url_request/url_request_test_util.h"
#include "services/network/p2p/socket_test_utils.h"
#include "services/network/proxy_resolving_client_socket_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
DeleteArg;
DoAll;
Return;
namespace network {
class P2PSocketTcpTestBase : public testing::Test { … };
class P2PSocketTcpTest : public P2PSocketTcpTestBase { … };
class P2PSocketStunTcpTest : public P2PSocketTcpTestBase { … };
TEST_F(P2PSocketTcpTest, SendStunNoAuth) { … }
TEST_F(P2PSocketTcpTest, ReceiveStun) { … }
TEST_F(P2PSocketTcpTest, SendDataNoAuth) { … }
TEST_F(P2PSocketTcpTest, SendAfterStunRequest) { … }
TEST_F(P2PSocketTcpTest, AsyncWrites) { … }
TEST_F(P2PSocketTcpTest, PacketIdIsPropagated) { … }
TEST_F(P2PSocketTcpTest, SendDataWithPacketOptions) { … }
TEST_F(P2PSocketTcpTest, IgnoreEmptyFrame) { … }
TEST_F(P2PSocketStunTcpTest, SendStunNoAuth) { … }
TEST_F(P2PSocketStunTcpTest, ReceiveStun) { … }
TEST_F(P2PSocketStunTcpTest, SendDataNoAuth) { … }
TEST_F(P2PSocketStunTcpTest, AsyncWrites) { … }
TEST(P2PSocketTcpWithPseudoTlsTest, Basic) { … }
TEST(P2PSocketTcpWithPseudoTlsTest, Hostname) { … }
class P2PSocketTcpWithTlsTest
: public testing::TestWithParam<std::tuple<net::IoMode, P2PSocketType>> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(P2PSocketTcpWithTlsTest, Basic) { … }
}