#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/base/chunked_upload_data_stream.h"
#include <memory>
#include <string>
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/base/upload_data_stream.h"
#include "net/log/net_log_with_source.h"
#include "net/test/gtest_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
IsError;
IsOk;
namespace net {
namespace {
constexpr char kTestData[] = …;
constexpr size_t kTestDataSize = …;
constexpr size_t kTestBufferSize = …;
}
std::string ReadSync(UploadDataStream* stream, int buffer_size) { … }
TEST(ChunkedUploadDataStreamTest, AppendOnce) { … }
TEST(ChunkedUploadDataStreamTest, AppendOnceBeforeRead) { … }
TEST(ChunkedUploadDataStreamTest, AppendOnceBeforeInit) { … }
TEST(ChunkedUploadDataStreamTest, MultipleAppends) { … }
TEST(ChunkedUploadDataStreamTest, MultipleAppendsBetweenReads) { … }
TEST(ChunkedUploadDataStreamTest, MultipleAppendsBeforeInit) { … }
TEST(ChunkedUploadDataStreamTest, MultipleReads) { … }
TEST(ChunkedUploadDataStreamTest, EmptyUpload) { … }
TEST(ChunkedUploadDataStreamTest, EmptyUploadEndedBeforeInit) { … }
TEST(ChunkedUploadDataStreamTest, RewindAfterComplete) { … }
TEST(ChunkedUploadDataStreamTest, RewindWhileReading) { … }
TEST(ChunkedUploadDataStreamTest, ChunkedUploadDataStreamWriter) { … }
}