chromium/components/performance_manager/execution_context_priority/inherit_client_priority_voter_unittest.cc

// Copyright 2020 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/inherit_client_priority_voter.h"

#include "base/memory/raw_ptr.h"
#include "components/performance_manager/execution_context_priority/root_vote_observer.h"
#include "components/performance_manager/public/execution_context/execution_context.h"
#include "components/performance_manager/public/execution_context/execution_context_registry.h"
#include "components/performance_manager/public/graph/graph.h"
#include "components/performance_manager/test_support/graph_test_harness.h"
#include "components/performance_manager/test_support/mock_graphs.h"
#include "components/performance_manager/test_support/test_worker_node_factory.h"
#include "components/performance_manager/test_support/voting.h"

namespace performance_manager {
namespace execution_context_priority {

DummyVoteObserver;

namespace {

const execution_context::ExecutionContext* GetExecutionContext(
    const WorkerNode* worker_node) {}

// All voting system components are expected to live on the graph, without being
// actual GraphOwned objects. This class wraps them to allow this.
class GraphOwnedWrapper : public GraphOwned {};

}  // namespace

class InheritClientPriorityVoterTest : public GraphTestHarness {};

TEST_F(InheritClientPriorityVoterTest, OneWorker) {}

// A vote is submitted to all children.
TEST_F(InheritClientPriorityVoterTest, MultipleWorkers) {}

// Tests that the priority is recursively inherited down a worker tree.
TEST_F(InheritClientPriorityVoterTest, DeepWorkerTree) {}

// Each client contributes a vote to a worker. Those votes are aggregated to a
// single vote.
TEST_F(InheritClientPriorityVoterTest, MultipleClients) {}

TEST_F(InheritClientPriorityVoterTest, SamePriorityDifferentReason) {}

}  // namespace execution_context_priority
}  // namespace performance_manager