#include "components/offline_pages/core/model/startup_maintenance_task.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "build/build_config.h"
#include "components/offline_pages/core/client_namespace_constants.h"
#include "components/offline_pages/core/model/model_task_test_base.h"
#include "components/offline_pages/core/model/offline_page_test_utils.h"
#include "components/offline_pages/core/offline_page_client_policy.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace offline_pages {
namespace {
const int64_t kTestFileSize = …;
enum class PagePresence { … };
}
class StartupMaintenanceTaskTest : public ModelTaskTestBase { … };
StartupMaintenanceTaskTest::StartupMaintenanceTaskTest() { … }
StartupMaintenanceTaskTest::~StartupMaintenanceTaskTest() { … }
void StartupMaintenanceTaskTest::SetUp() { … }
PagePresence StartupMaintenanceTaskTest::CheckPagePresence(
const OfflinePageItem& page) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_TestDeletePageInLegacyArchivesDir …
#else
#define MAYBE_TestDeletePageInLegacyArchivesDir …
#endif
TEST_F(StartupMaintenanceTaskTest, MAYBE_TestDeletePageInLegacyArchivesDir) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_TestDeleteFileWithoutDbEntry …
#else
#define MAYBE_TestDeleteFileWithoutDbEntry …
#endif
TEST_F(StartupMaintenanceTaskTest, MAYBE_TestDeleteFileWithoutDbEntry) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_TestDeleteDbEntryWithoutFile …
#else
#define MAYBE_TestDeleteDbEntryWithoutFile …
#endif
TEST_F(StartupMaintenanceTaskTest, MAYBE_TestDeleteDbEntryWithoutFile) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_CombinedTest …
#else
#define MAYBE_CombinedTest …
#endif
TEST_F(StartupMaintenanceTaskTest, MAYBE_CombinedTest) { … }
TEST_F(StartupMaintenanceTaskTest, TestKeepingNonMhtmlFile) { … }
TEST_F(StartupMaintenanceTaskTest, TestReportStorageUsage) { … }
}