chromium/components/webrtc/fake_ssl_client_socket_unittest.cc

// Copyright 2012 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/webrtc/fake_ssl_client_socket.h"

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

#include <algorithm>
#include <memory>
#include <string_view>
#include <utility>
#include <vector>

#include "base/memory/ref_counted.h"
#include "base/test/task_environment.h"
#include "net/base/completion_once_callback.h"
#include "net/base/completion_repeating_callback.h"
#include "net/base/io_buffer.h"
#include "net/base/ip_address.h"
#include "net/base/test_completion_callback.h"
#include "net/log/net_log_source.h"
#include "net/log/net_log_with_source.h"
#include "net/socket/socket_tag.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 "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace webrtc {

namespace {

Return;
ReturnRef;

// Used by RunUnsuccessfulHandshakeTestHelper.  Represents where in
// the handshake step an error should be inserted.
enum HandshakeErrorLocation {};

// Private error codes appended to the net::Error set.
enum {};

// Used by PassThroughMethods test.
class MockClientSocket : public net::StreamSocket {};

// Break up |data| into a bunch of chunked MockReads/Writes and push
// them onto |ops|.
template <net::MockReadWriteType type>
void AddChunkedOps(std::string_view data,
                   size_t chunk_size,
                   net::IoMode mode,
                   std::vector<net::MockReadWrite<type>>* ops) {}

class FakeSSLClientSocketTest : public testing::Test {};

TEST_F(FakeSSLClientSocketTest, PassThroughMethods) {}

TEST_F(FakeSSLClientSocketTest, SuccessfulHandshakeSync) {}

TEST_F(FakeSSLClientSocketTest, SuccessfulHandshakeAsync) {}

TEST_F(FakeSSLClientSocketTest, ResetSocket) {}

TEST_F(FakeSSLClientSocketTest, UnsuccessfulHandshakeConnectError) {}

TEST_F(FakeSSLClientSocketTest, UnsuccessfulHandshakeWriteError) {}

TEST_F(FakeSSLClientSocketTest, UnsuccessfulHandshakeReadError) {}

TEST_F(FakeSSLClientSocketTest, PeerClosedDuringHandshake) {}

TEST_F(FakeSSLClientSocketTest, MalformedServerHello) {}

}  // namespace

}  // namespace webrtc