chromium/components/openscreen_platform/tls_client_connection_unittest.cc

// Copyright 2019 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 "components/openscreen_platform/tls_client_connection.h"

#include <cstring>
#include <iterator>
#include <memory>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Mock;
StrictMock;

namespace openscreen_platform {

Error;
TlsConnection;

namespace {
const openscreen::IPEndpoint kValidEndpointOne{};
const openscreen::IPEndpoint kValidEndpointTwo{};

constexpr int kDataPipeCapacity =;

const uint8_t kTestMessage[] =;

// Creates two data pipes, one for inbound data and one for outbound data, and
// provides test utilities for simulating socket stream events of interest.
class FakeSocketStreams {};

class MockTlsConnectionClient : public TlsConnection::Client {};

}  // namespace

class TlsClientConnectionTest : public ::testing::Test {};

TEST_F(TlsClientConnectionTest, CallsClientOnReadForInboundData) {}

TEST_F(TlsClientConnectionTest, CallsClientOnErrorWhenSocketInboundCloses) {}

TEST_F(TlsClientConnectionTest, SendsUntilBlocked) {}

TEST_F(TlsClientConnectionTest,
       CallsClientOnErrorWhenSendingToClosedOutboundStream) {}

TEST_F(TlsClientConnectionTest, CanRetrieveAddresses) {}

}  // namespace openscreen_platform