chromium/components/download/internal/background_service/scheduler/scheduler_impl_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/download/internal/background_service/scheduler/scheduler_impl.h"

#include <stdint.h>
#include <memory>

#include "base/strings/string_number_conversions.h"
#include "components/download/internal/background_service/config.h"
#include "components/download/internal/background_service/entry.h"
#include "components/download/internal/background_service/scheduler/device_status.h"
#include "components/download/public/task/task_scheduler.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
InSequence;

namespace download {
namespace {

class MockTaskScheduler : public TaskScheduler {};

class DownloadSchedulerImplTest : public testing::Test {};

// Ensures normal polling logic is correct.
TEST_F(DownloadSchedulerImplTest, BasicPolling) {}

// Tests the load balancing and polling downloads based on cancel time.
TEST_F(DownloadSchedulerImplTest, BasicLoadBalancing) {}

// Ensures downloads are polled based on scheduling parameters and device
// status.
TEST_F(DownloadSchedulerImplTest, SchedulingParams) {}

// Ensures higher priority will be scheduled first.
TEST_F(DownloadSchedulerImplTest, Priority) {}

// Ensures UI priority entries are subject to device status check.
TEST_F(DownloadSchedulerImplTest, UIPrioritySubjectToDeviceStatus) {}

// UI priority entries will be processed first even if they doesn't belong to
// the current client in load balancing.
TEST_F(DownloadSchedulerImplTest, UIPriorityLoadBalancing) {}

TEST_F(DownloadSchedulerImplTest, PickOlderDownloadIfSameParameters) {}

// When multiple UI priority entries exist, the next entry is selected based on
// cancel time and load balancing.
TEST_F(DownloadSchedulerImplTest, MultipleUIPriorityEntries) {}

// Ensures the reschedule logic works correctly, and we can pass the correct
// criteria to platform task scheduler.
TEST_F(DownloadSchedulerImplTest, Reschedule) {}

}  // namespace
}  // namespace download