chromium/components/performance_manager/execution_context_priority/override_vote_aggregator_unittest.cc

// Copyright 2019 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/performance_manager/execution_context_priority/override_vote_aggregator.h"

#include "components/performance_manager/test_support/voting.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace performance_manager {
namespace execution_context_priority {

DummyVoteObserver;

// Some dummy execution contexts.
const ExecutionContext* kExecutionContext0 =;
const ExecutionContext* kExecutionContext1 =;

static const Vote kLowPriorityVote0(base::TaskPriority::LOWEST, "low reason 0");
static const Vote kLowPriorityVote1(base::TaskPriority::LOWEST, "low reason 1");

static const Vote kMediumPriorityVote0(base::TaskPriority::USER_VISIBLE,
                                       "medium reason 0");
static const Vote kMediumPriorityVote1(base::TaskPriority::USER_VISIBLE,
                                       "medium reason 1");

static const Vote kHighPriorityVote0(base::TaskPriority::HIGHEST,
                                     "high reason 0");
static const Vote kHighPriorityVote1(base::TaskPriority::HIGHEST,
                                     "high reason 1");

class OverrideVoteAggregatorTest : public testing::Test {};

// Tests that in the case of a single voter, the vote is simply propagated
// upwards.
TEST_F(OverrideVoteAggregatorTest, SingleVoter) {}

TEST_F(OverrideVoteAggregatorTest, OneContext) {}

// A less extensive test than OneContext that sanity checks that votes for
// different contexts are aggregated independently.
TEST_F(OverrideVoteAggregatorTest, MultipleContexts) {}

}  // namespace execution_context_priority
}  // namespace performance_manager