chromium/media/capabilities/video_decode_stats_db_impl_unittest.cc

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

#include <map>
#include <memory>

#include "base/check.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_clock.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/leveldb_proto/testing/fake_db.h"
#include "media/base/media_switches.h"
#include "media/base/test_data_util.h"
#include "media/base/video_codecs.h"
#include "media/capabilities/video_decode_stats.pb.h"
#include "media/capabilities/video_decode_stats_db_impl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/size.h"

FakeDB;
_;
Eq;
Pointee;

namespace media {

class VideoDecodeStatsDBImplTest : public ::testing::Test {};

TEST_F(VideoDecodeStatsDBImplTest, InitializeFailed) {}

TEST_F(VideoDecodeStatsDBImplTest, InitializeTimedOut) {}

TEST_F(VideoDecodeStatsDBImplTest, ReadExpectingNothing) {}

TEST_F(VideoDecodeStatsDBImplTest, WriteReadAndClear) {}

TEST_F(VideoDecodeStatsDBImplTest, ConfigureMaxFramesPerBuffer) {}

namespace {

class DBClockScope {};

}  // namespace

TEST_F(VideoDecodeStatsDBImplTest, ConfigureExpireDays) {}

TEST_F(VideoDecodeStatsDBImplTest, FailedWrite) {}

TEST_F(VideoDecodeStatsDBImplTest, FillBufferInMixedIncrements) {}

// Overfilling an empty buffer triggers the codepath to compute weighted dropped
// and power efficient ratios under a circumstance where the existing counts are
// all zero. This test ensures that we don't do any dividing by zero with that
// empty data.
TEST_F(VideoDecodeStatsDBImplTest, OverfillEmptyBuffer) {}

TEST_F(VideoDecodeStatsDBImplTest, NoWriteDateReadAndExpire) {}

TEST_F(VideoDecodeStatsDBImplTest, NoWriteDateAppendReadAndExpire) {}

TEST_F(VideoDecodeStatsDBImplTest, AppendAndExpire) {}

TEST_F(VideoDecodeStatsDBImplTest, EnableUnweightedEntries) {}

TEST_F(VideoDecodeStatsDBImplTest, DiscardCorruptedDBData) {}

}  // namespace media