chromium/third_party/blink/renderer/platform/media/multi_buffer_unittest.cc

// Copyright 2015 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/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 {};

}  // namespace

class TestMultiBuffer : public MultiBuffer {};

class MultiBufferTest : public testing::Test {};

TEST_F(MultiBufferTest, ReadAll) {}

TEST_F(MultiBufferTest, ReadAllAdvanceFirst) {}

// Checks that if the data provider provides too much data after we told it
// to defer, we kill it.
TEST_F(MultiBufferTest, ReadAllAdvanceFirst_NeverDefer) {}

// Same as ReadAllAdvanceFirst_NeverDefer, but the url doesn't support
// ranges, so we don't destroy it no matter how much data it provides.
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) {}

}  // namespace blink