#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/protocol/chromium_socket_factory.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <numeric>
#include <string>
#include <vector>
#include "base/containers/contains.h"
#include "base/containers/flat_set.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/rtc_base/async_packet_socket.h"
#include "third_party/webrtc/rtc_base/network/received_packet.h"
#include "third_party/webrtc/rtc_base/socket_address.h"
#include "third_party/webrtc/rtc_base/time_utils.h"
namespace remoting::protocol {
namespace {
constexpr int kMaxAttempts = …;
constexpr base::TimeDelta kAttemptPeriod = …;
class ConstantScopedFakeClock : public rtc::ClockInterface { … };
}
class ChromiumSocketFactoryTest : public testing::Test,
public sigslot::has_slots<> { … };
TEST_F(ChromiumSocketFactoryTest, SendAndReceiveOnePacket) { … }
TEST_F(ChromiumSocketFactoryTest, SendAndReceiveOneLargePacket) { … }
TEST_F(ChromiumSocketFactoryTest, SendAndReceiveManyPackets) { … }
TEST_F(ChromiumSocketFactoryTest, SetOptions) { … }
TEST_F(ChromiumSocketFactoryTest, PortRange) { … }
TEST_F(ChromiumSocketFactoryTest, CreateMultiplePortsFromPortRange) { … }
TEST_F(ChromiumSocketFactoryTest, TransientError) { … }
TEST_F(ChromiumSocketFactoryTest, CheckSendTime) { … }
}