Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: sync/sessions/ordered_commit_set_unittest.cc

Issue 10210009: sync: Loop committing items without downloading updates (v2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor loop again, add comments + more Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/sessions/ordered_commit_set_unittest.cc
diff --git a/sync/sessions/ordered_commit_set_unittest.cc b/sync/sessions/ordered_commit_set_unittest.cc
index fee37bfbb6d6caf8d8d82f0e7558f3826d39de22..6310c9d9d906df7b7d35ff7b84fd3c42cd3131cb 100644
--- a/sync/sessions/ordered_commit_set_unittest.cc
+++ b/sync/sessions/ordered_commit_set_unittest.cc
@@ -115,6 +115,18 @@ TEST_F(OrderedCommitSetTest, HasBookmarkCommitId) {
EXPECT_FALSE(commit_set.HasBookmarkCommitId());
}
+TEST_F(OrderedCommitSetTest, AddAndRemoveEntries) {
+ OrderedCommitSet commit_set(routes_);
+
+ ASSERT_TRUE(commit_set.Empty());
+
+ commit_set.AddCommitItem(0, ids_.NewLocalId(), syncable::AUTOFILL);
+ ASSERT_EQ(static_cast<size_t>(1), commit_set.Size());
+
+ commit_set.Clear();
+ ASSERT_TRUE(commit_set.Empty());
+}
+
} // namespace sessions
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698