#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/image-decoders/rw_buffer.h"
#include <array>
#include "base/threading/platform_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkStream.h"
namespace blink {
namespace {
const char gABC[] = …;
void check_abcs(const char buffer[], size_t size) { … }
void check_alphabet_buffer(const ROBuffer* reader) { … }
size_t write_into_buffer(size_t reps, void* buffer, size_t capacity) { … }
class ROBufferTestThread : public base::PlatformThread::Delegate { … };
}
TEST(RWBufferTest, Append) { … }
TEST(RWBufferTest, Threaded) { … }
TEST(RWBufferTest, Size) { … }
TEST(RWBufferTest, Empty) { … }
TEST(RWBufferTest, HasNoSnapshotsEmpty) { … }
TEST(RWBufferTest, HasNoSnapshots) { … }
TEST(RWBufferTest, FunctionConstructorSmall) { … }
TEST(RWBufferTest, FunctionConstructorLarge) { … }
}