chromium/remoting/protocol/chromium_socket_factory_unittest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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 {

// UDP packets may be lost, so we have to retry sending it more than once.
constexpr int kMaxAttempts =;

// The amount of time to wait for packets to be received for each attempt.
constexpr base::TimeDelta kAttemptPeriod =;

class ConstantScopedFakeClock : public rtc::ClockInterface {};

}  // namespace

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) {}

}  // namespace remoting::protocol