#include "components/download/internal/common/download_db_cache.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/uuid.h"
#include "components/download/database/download_db_conversions.h"
#include "components/download/database/download_db_entry.h"
#include "components/download/database/download_db_impl.h"
#include "components/download/database/in_progress/download_entry.h"
#include "components/download/public/common/download_item_impl.h"
#include "components/download/public/common/download_utils.h"
#include "components/download/public/common/mock_download_item.h"
#include "components/leveldb_proto/testing/fake_db.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Return;
ReturnRefOfCopy;
namespace download {
namespace {
DownloadDBEntry CreateDownloadDBEntry() { … }
std::string GetKey(const std::string& guid) { … }
void CleanUpInProgressEntry(DownloadDBEntry* entry) { … }
}
class DownloadDBCacheTest : public testing::Test { … };
TEST_F(DownloadDBCacheTest, InitializeAndRetrieve) { … }
TEST_F(DownloadDBCacheTest, AddNewEntry) { … }
TEST_F(DownloadDBCacheTest, ModifyExistingEntry) { … }
TEST_F(DownloadDBCacheTest, FilePathChange) { … }
TEST_F(DownloadDBCacheTest, RemoveEntry) { … }
TEST_F(DownloadDBCacheTest, RemoveWhileModifyExistingEntry) { … }
}