chromium/components/offline_pages/core/background/cleanup_task_unittest.cc

// Copyright 2016 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/background/cleanup_task.h"

#include <memory>
#include <set>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/test/test_mock_time_task_runner.h"
#include "components/offline_pages/core/background/offliner_policy.h"
#include "components/offline_pages/core/background/request_coordinator.h"
#include "components/offline_pages/core/background/request_coordinator_event_logger.h"
#include "components/offline_pages/core/background/request_notifier.h"
#include "components/offline_pages/core/background/request_queue_store.h"
#include "components/offline_pages/core/background/request_queue_task_test_base.h"
#include "components/offline_pages/core/background/save_page_request.h"
#include "components/offline_pages/core/background/test_request_queue_store.h"
#include "components/offline_pages/core/offline_clock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace offline_pages {
namespace {

// Data for request 1.
const int64_t kRequestId1 =;
const ClientId kClientId1("bookmark", "1234");
// Data for request 2.
const int64_t kRequestId2 =;

const ClientId kClientId2("bookmark", "5678");
const bool kUserRequested =;

// Default request
SavePageRequest EmptyRequest() {}

// TODO: Refactor this stub class into its own file, use in Pick Request Task
// Test too.
// Helper class needed by the CleanupTask
class RequestNotifierStub : public RequestNotifier {};

class CleanupTaskTest : public RequestQueueTaskTestBase {};

void CleanupTaskTest::SetUp() {}

void CleanupTaskTest::GetRequestsCallback(
    bool success,
    std::vector<std::unique_ptr<SavePageRequest>> requests) {}

// Test helper to queue the two given requests.
void CleanupTaskTest::QueueRequests(const SavePageRequest& request1,
                                    const SavePageRequest& request2) {}

void CleanupTaskTest::MakeFactoryAndTask() {}

TEST_F(CleanupTaskTest, CleanupExpiredRequest) {}

TEST_F(CleanupTaskTest, CleanupStartCountExceededRequest) {}

TEST_F(CleanupTaskTest, CleanupCompletionCountExceededRequest) {}

TEST_F(CleanupTaskTest, IgnoreRequestInProgress) {}

}  // namespace
}  // namespace offline_pages