#include "components/sync/engine/commit_processor.h"
#include <memory>
#include "components/sync/engine/commit_contribution.h"
#include "components/sync/engine/commit_contributor.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
namespace {
constexpr int kMaxEntries = …;
_;
IsEmpty;
Pair;
UnorderedElementsAre;
MATCHER_P(HasNumEntries, num_entries, "") { … }
class FakeCommitContribution : public CommitContribution { … };
ACTION_P(ReturnContributionWithEntries, num_entries) { … }
class MockCommitContributor : public CommitContributor { … };
class CommitProcessorTest : public testing::Test { … };
TEST_F(CommitProcessorTest, ShouldGatherNigoriOnlyContribution) { … }
TEST_F(CommitProcessorTest, ShouldGatherHighPriorityUserTypesOnlyContribution) { … }
TEST_F(CommitProcessorTest, ShouldGatherRegularUserTypes) { … }
TEST_F(CommitProcessorTest, ShouldGatherLowPriorityUserTypes) { … }
TEST_F(CommitProcessorTest, ShouldGatherMultipleRegularUserTypes) { … }
TEST_F(CommitProcessorTest, ShouldContinueGatheringHighPriorityContributions) { … }
TEST_F(CommitProcessorTest, ShouldContinueGatheringRegularContributions) { … }
TEST_F(CommitProcessorTest, ShouldContinueGatheringLowPriorityContributions) { … }
TEST_F(CommitProcessorTest,
ShouldContinueGatheringRegularContributionsIfMatchingMaxEntries) { … }
TEST_F(CommitProcessorTest, ShouldGatherInPriorityOrder) { … }
}
}