#include "net/socket/socket_bio_adapter.h"
#include <string.h>
#include <memory>
#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "build/build_config.h"
#include "crypto/openssl_util.h"
#include "net/base/address_list.h"
#include "net/base/completion_once_callback.h"
#include "net/base/net_errors.h"
#include "net/log/net_log_source.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/stream_socket.h"
#include "net/ssl/openssl_ssl_util.h"
#include "net/test/test_with_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/include/openssl/bio.h"
#include "third_party/boringssl/src/include/openssl/err.h"
#include "third_party/boringssl/src/include/openssl/ssl.h"
namespace net {
enum ReadIfReadySupport { … };
class SocketBIOAdapterTest : public testing::TestWithParam<ReadIfReadySupport>,
public SocketBIOAdapter::Delegate,
public WithTaskEnvironment { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(SocketBIOAdapterTest, ReadSync) { … }
TEST_P(SocketBIOAdapterTest, ReadAsync) { … }
TEST_P(SocketBIOAdapterTest, ReadEOFSync) { … }
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_ReadEOFAsync …
#else
#define MAYBE_ReadEOFAsync …
#endif
TEST_P(SocketBIOAdapterTest, MAYBE_ReadEOFAsync) { … }
TEST_P(SocketBIOAdapterTest, WriteSync) { … }
TEST_P(SocketBIOAdapterTest, WriteAsync) { … }
TEST_P(SocketBIOAdapterTest, WriteStopsRead) { … }
TEST_P(SocketBIOAdapterTest, SyncWriteInterruptsRead) { … }
TEST_P(SocketBIOAdapterTest, AsyncWriteInterruptsRead) { … }
TEST_P(SocketBIOAdapterTest, AsyncWriteInterruptsBoth) { … }
TEST_P(SocketBIOAdapterTest, DeleteOnWriteReady) { … }
TEST_P(SocketBIOAdapterTest, Detached) { … }
}