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

Unified Diff: sync/sessions/sync_session_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/sync_session_unittest.cc
diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc
index d5ce46a6d3c8b16043ee1636fd4d9d3467b66baf..cf6b2931d208f5984cf67d6e9cc030811fd8cb11 100644
--- a/sync/sessions/sync_session_unittest.cc
+++ b/sync/sessions/sync_session_unittest.cc
@@ -192,26 +192,6 @@ TEST_F(SyncSessionTest, SetWriteTransaction) {
}
}
-TEST_F(SyncSessionTest, MoreToSyncIfUnsyncedGreaterThanCommitted) {
- // If any forward progress was made during the session, and the number of
- // unsynced handles still exceeds the number of commit ids we added, there is
- // more to sync. For example, this occurs if we had more commit ids
- // than could fit in a single commit batch.
- EXPECT_FALSE(session_->HasMoreToSync());
- OrderedCommitSet commit_set(routes_);
- commit_set.AddCommitItem(0, syncable::Id(), syncable::BOOKMARKS);
- status()->set_commit_set(commit_set);
- EXPECT_FALSE(session_->HasMoreToSync());
-
- std::vector<int64> unsynced_handles;
- unsynced_handles.push_back(1);
- unsynced_handles.push_back(2);
- status()->set_unsynced_handles(unsynced_handles);
- EXPECT_FALSE(session_->HasMoreToSync());
- status()->increment_num_successful_commits();
- EXPECT_TRUE(session_->HasMoreToSync());
-}
-
TEST_F(SyncSessionTest, MoreToDownloadIfDownloadFailed) {
status()->set_updates_request_types(ParamsMeaningAllEnabledTypes());

Powered by Google App Engine
This is Rietveld 408576698