#include <memory>
#include <utility>
#include "base/test/bind.h"
#include "base/test/test_future.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/browser_context.h"
#include "content/public/test/test_storage_partition.h"
#include "extensions/browser/api/socket/tls_socket.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/address_list.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/socket/socket_test_util.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
#include "net/url_request/url_request_test_util.h"
#include "services/network/network_context.h"
#include "services/network/public/mojom/network_context.mojom.h"
namespace extensions {
namespace {
const char kTestMsg[] = …;
const int kTestMsgLength = …;
const char FAKE_ID[] = …;
ConnectFuture;
ReadFuture;
UpgradeToTLSFuture;
WriteFuture;
class TLSSocketTestBase : public extensions::ExtensionServiceTestBase { … };
}
class TLSSocketTest : public TLSSocketTestBase,
public ::testing::WithParamInterface<net::IoMode> { … };
TEST_F(TLSSocketTest, DestroyWhileReadPending) { … }
TEST_F(TLSSocketTest, UpgradeToTLSWhilePendingRead) { … }
TEST_F(TLSSocketTest, UpgradeToTLSWithCustomOptionsTLS12) { … }
TEST_F(TLSSocketTest, UpgradeToTLSWithCustomOptionsTLS13) { … }
TEST_F(TLSSocketTest, UpgradeToTLSWithCustomOptionsTLS10) { … }
TEST_F(TLSSocketTest, UpgradeToTLSWithCustomOptionsTLS11) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(TLSSocketTest, ReadWrite) { … }
TEST_P(TLSSocketTest, PartialRead) { … }
TEST_P(TLSSocketTest, ReadError) { … }
TEST_P(TLSSocketTest, MultipleWrite) { … }
TEST_P(TLSSocketTest, PartialWrite) { … }
TEST_P(TLSSocketTest, WriteError) { … }
}