chromium/components/offline_pages/core/model/startup_maintenance_task_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 "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 =;  // Default file size is 512KB.

// Used for checking if the page is still present in database and/or filesystem.
enum class PagePresence {};

}  // namespace

class StartupMaintenanceTaskTest : public ModelTaskTestBase {};

StartupMaintenanceTaskTest::StartupMaintenanceTaskTest() {}

StartupMaintenanceTaskTest::~StartupMaintenanceTaskTest() {}

void StartupMaintenanceTaskTest::SetUp() {}

PagePresence StartupMaintenanceTaskTest::CheckPagePresence(
    const OfflinePageItem& page) {}

// This test is affected by https://crbug.com/725685, which only affects windows
// platform.
#if BUILDFLAG(IS_WIN)
#define MAYBE_TestDeletePageInLegacyArchivesDir
#else
#define MAYBE_TestDeletePageInLegacyArchivesDir
#endif
TEST_F(StartupMaintenanceTaskTest, MAYBE_TestDeletePageInLegacyArchivesDir) {}

// This test is affected by https://crbug.com/725685, which only affects windows
// platform.
#if BUILDFLAG(IS_WIN)
#define MAYBE_TestDeleteFileWithoutDbEntry
#else
#define MAYBE_TestDeleteFileWithoutDbEntry
#endif
TEST_F(StartupMaintenanceTaskTest, MAYBE_TestDeleteFileWithoutDbEntry) {}

// This test is affected by https://crbug.com/725685, which only affects windows
// platform.
#if BUILDFLAG(IS_WIN)
#define MAYBE_TestDeleteDbEntryWithoutFile
#else
#define MAYBE_TestDeleteDbEntryWithoutFile
#endif
TEST_F(StartupMaintenanceTaskTest, MAYBE_TestDeleteDbEntryWithoutFile) {}

// This test is affected by https://crbug.com/725685, which only affects windows
// platform.
#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) {}

}  // namespace offline_pages