chromium/components/image_fetcher/core/cache/image_metadata_store_leveldb_unittest.cc

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

#include "components/image_fetcher/core/cache/image_metadata_store_leveldb.h"

#include <map>
#include <utility>

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/simple_test_clock.h"
#include "base/test/task_environment.h"
#include "components/image_fetcher/core/cache/image_store_types.h"
#include "components/image_fetcher/core/cache/proto/cached_image_metadata.pb.h"
#include "components/leveldb_proto/testing/fake_db.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

FakeDB;
Mock;
_;

namespace image_fetcher {

namespace {

constexpr char kImageKey[] =;
constexpr char kOtherImageKey[] =;
constexpr int kImageDataLength =;

}  // namespace

class CachedImageFetcherImageMetadataStoreLevelDBTest : public testing::Test {};

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, Initialize) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, SaveBeforeInit) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, Save) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, DeleteBeforeInit) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, Delete) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, DeleteDifferentKey) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest,
       UpdateImageMetadataBeforeInit) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, UpdateImageMetadata) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest,
       UpdateImageMetadataNoHits) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest,
       UpdateImageMetadataLoadFailed) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, GetAllKeysBeforeInit) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, GetAllKeys) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, GetAllKeysLoadFailed) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, GetEstimatedSize) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest,
       GarbageCollectBeforeInit) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, GarbageCollect) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, GarbageCollectNoHits) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest,
       GarbageCollectWithBytesProvided) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest,
       GarbageCollectNoHitsButBytesProvided) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest,
       GarbageCollectLoadFailed) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest,
       GarbageCollectUpdateFailed) {}

TEST_F(CachedImageFetcherImageMetadataStoreLevelDBTest, LoadImageMetadata) {}

}  // namespace image_fetcher