chromium/remoting/protocol/channel_socket_adapter_unittest.cc

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

#include "remoting/protocol/channel_socket_adapter.h"

#include <stddef.h>
#include <stdint.h>

#include <memory>

#include "base/functional/bind.h"
#include "base/memory/ref_counted.h"
#include "base/test/task_environment.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/socket/socket.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/api/array_view.h"
#include "third_party/webrtc/p2p/base/mock_ice_transport.h"
#include "third_party/webrtc/rtc_base/network/received_packet.h"

IOBufferWithSize;

_;
Return;

namespace remoting::protocol {

namespace {
const int kBufferSize =;
const uint8_t kTestData[] =;
const int kTestDataSize =;
const int kTestError =;
}  // namespace

class IceTransportForTest : public cricket::MockIceTransport {};

class TransportChannelSocketAdapterTest : public testing::Test {};

// Verify that Read() returns net::ERR_IO_PENDING.
TEST_F(TransportChannelSocketAdapterTest, Read) {}

// Verify that Read() after Close() returns error.
TEST_F(TransportChannelSocketAdapterTest, ReadClose) {}

// Verify that Send sends the packet and returns correct result.
TEST_F(TransportChannelSocketAdapterTest, Send) {}

// Verify that the message is still sent if Send() is called while
// socket is not open yet. The result is the packet is lost.
TEST_F(TransportChannelSocketAdapterTest, SendPending) {}

}  // namespace remoting::protocol