chromium/components/performance_manager/voting/voting_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/public/voting/voting.h"

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

namespace performance_manager {

namespace {

AssertionFailure;
AssertionResult;
AssertionSuccess;

TestVote;
TestVotingChannel;
TestVotingChannelFactory;

DummyVoteObserver;

// Some dummy contexts.
const void* kDummyContext1 =;
const void* kDummyContext2 =;

static const char kReason[] =;

}  // namespace

TEST(VotingTest, SimpleVoter) {}

// Tests that an observer can receive votes for different contexts from the same
// voting channel.
TEST(VotingTest, OneVoterMultipleContexts) {}

// Tests that an observer can receive votes from more than one voting channel.
TEST(VotingTest, TwoVoter) {}

TEST(VotingTest, ResetVotingChannel) {}

// Tests that VotingChannel supports move sementics.
TEST(VotingTest, MoveVotingChannel) {}

// Tests that submitting 2 votes for the same context using a VotingChannel
// results in a DCHECK.
TEST(VotingTest, SubmitDuplicateVote) {}

// Tests that calling ChangeVote() for a context before a vote was submitted for
// that context results in a DCHECK.
TEST(VotingTest, ChangeNonExisting) {}

// Tests that calling InvalidateVote() for a context before a vote was submitted
// for that context results in a DCHECK.
TEST(VotingTest, InvalidateNonExisting) {}

// Tests that destroying a VotingChannelFactory before all of its VotingChannels
// results in a DCHECK.
TEST(VotingTest, DestroyFactoryBeforeChannel) {}

}  // namespace performance_manager