#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/media/multi_buffer.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/containers/circular_deque.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/simple_test_tick_clock.h"
#include "media/base/fake_single_thread_task_runner.h"
#include "media/base/test_random.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/media/multi_buffer_reader.h"
namespace blink {
namespace {
class FakeMultiBufferDataProvider;
const int kBlockSizeShift = …;
const size_t kBlockSize = …;
std::vector<FakeMultiBufferDataProvider*> writers;
class FakeMultiBufferDataProvider : public MultiBuffer::DataProvider { … };
}
class TestMultiBuffer : public MultiBuffer { … };
class MultiBufferTest : public testing::Test { … };
TEST_F(MultiBufferTest, ReadAll) { … }
TEST_F(MultiBufferTest, ReadAllAdvanceFirst) { … }
TEST_F(MultiBufferTest, ReadAllAdvanceFirst_NeverDefer) { … }
TEST_F(MultiBufferTest, ReadAllAdvanceFirst_NeverDefer2) { … }
TEST_F(MultiBufferTest, LRUTest) { … }
TEST_F(MultiBufferTest, LRUTest2) { … }
TEST_F(MultiBufferTest, LRUTestExpirationTest) { … }
class ReadHelper { … };
TEST_F(MultiBufferTest, RandomTest) { … }
TEST_F(MultiBufferTest, RandomTest_RangeSupported) { … }
}