#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "content/browser/byte_stream.h"
#include <stddef.h>
#include <limits>
#include "base/containers/circular_deque.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "net/base/io_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace {
void CountCallbacks(int* counter) { … }
}
class ByteStreamTest : public testing::Test { … };
ByteStreamTest::ByteStreamTest()
: … { … }
TEST_F(ByteStreamTest, ByteStream_PushBack) { … }
TEST_F(ByteStreamTest, ByteStream_Flush) { … }
TEST_F(ByteStreamTest, ByteStream_PushBackSplit) { … }
TEST_F(ByteStreamTest, ByteStream_CompleteTransmits) { … }
TEST_F(ByteStreamTest, ByteStream_SinkCallback) { … }
TEST_F(ByteStreamTest, ByteStream_SourceCallback) { … }
TEST_F(ByteStreamTest, ByteStream_SinkInterrupt) { … }
TEST_F(ByteStreamTest, ByteStream_SourceInterrupt) { … }
TEST_F(ByteStreamTest, ByteStream_ZeroCallback) { … }
TEST_F(ByteStreamTest, ByteStream_CloseWithoutAnyWrite) { … }
TEST_F(ByteStreamTest, ByteStream_FlushWithoutAnyWrite) { … }
TEST_F(ByteStreamTest, ByteStream_WriteOverflow) { … }
}