#include "services/network/shared_dictionary/shared_dictionary_data_pipe_writer.h"
#include <optional>
#include "base/containers/span.h"
#include "base/strings/strcat.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/system/data_pipe_utils.h"
#include "net/base/net_errors.h"
#include "services/network/shared_dictionary/shared_dictionary_writer.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace network {
namespace {
const std::string kTestData = …;
const std::string kTestData1 = …;
const std::string kTestData2 = …;
class DummySharedDictionaryWriter : public SharedDictionaryWriter { … };
}
class SharedDictionaryDataPipeWriterTest : public ::testing::Test { … };
TEST_F(SharedDictionaryDataPipeWriterTest, EmptyInput) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, OneDataInput) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, DelayedOnComplete) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, OnCompleteAndEndOfInput) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, EndOfInputAndOnCompleteFailure) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, OnCompleteFailureAndEndOfInput) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, TwoDataInputOneTimeRead) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, TwoDataInputTwoTimeRead) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, DataBeforeCreatingDataPipeWriter) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, PeerClosed) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, ReadAndPeerClosed) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, PeerClosedAndOnCompleteFailure) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, PeerClosedAndOnComplete) { … }
TEST_F(SharedDictionaryDataPipeWriterTest, WriteDataWait) { … }
}