chromium/third_party/blink/renderer/platform/image-decoders/rw_buffer_test.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#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) {}

// reader should contains an integral number of copies of gABC.
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 {};

}  // namespace

TEST(RWBufferTest, Append) {}

TEST(RWBufferTest, Threaded) {}

// Tests that it is safe to call ROBuffer::Iter::size() when exhausted.
TEST(RWBufferTest, Size) {}

// Tests that operations (including the destructor) are safe on an RWBuffer
// without any data appended.
TEST(RWBufferTest, Empty) {}

// Tests that |HasNoSnapshots| returns the correct value when the buffer is
// empty.
// In this case, we can't tell if a snapshot has been created (in general), so
// we expect to always get back false.
TEST(RWBufferTest, HasNoSnapshotsEmpty) {}

// Tests that |HasNoSnapshots| returns the correct value when the buffer is
// non-empty.
TEST(RWBufferTest, HasNoSnapshots) {}

TEST(RWBufferTest, FunctionConstructorSmall) {}

TEST(RWBufferTest, FunctionConstructorLarge) {}

}  // namespace blink