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

Unified Diff: sync/sessions/sync_session_unittest.cc

Issue 11185064: FYI: Move conflict resolve + clean up afterwards (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « sync/sessions/sync_session.cc ('k') | sync/sessions/test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session_unittest.cc
diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc
index 285f33a3dc0e713c9cefc61b30d3e5434a644345..23d4ab9fa3615e314928cd6a12ce46dbe95f3020 100644
--- a/sync/sessions/sync_session_unittest.cc
+++ b/sync/sessions/sync_session_unittest.cc
@@ -13,7 +13,6 @@
#include "sync/engine/throttled_data_type_tracker.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base/model_type_invalidation_map_test_util.h"
-#include "sync/sessions/session_state.h"
#include "sync/sessions/status_controller.h"
#include "sync/syncable/syncable_id.h"
#include "sync/syncable/write_transaction.h"
@@ -194,10 +193,6 @@ TEST_F(SyncSessionTest, MoreToDownloadIfDownloadFailed) {
// When DownloadUpdatesCommand fails, these should be false.
EXPECT_FALSE(status()->ServerSaysNothingMoreToDownload());
EXPECT_FALSE(status()->download_updates_succeeded());
-
- // Download updates has its own loop in the syncer; it shouldn't factor
- // into HasMoreToSync.
- EXPECT_FALSE(session_->HasMoreToSync());
}
TEST_F(SyncSessionTest, MoreToDownloadIfGotChangesRemaining) {
@@ -210,10 +205,6 @@ TEST_F(SyncSessionTest, MoreToDownloadIfGotChangesRemaining) {
->set_changes_remaining(1000L);
EXPECT_FALSE(status()->ServerSaysNothingMoreToDownload());
EXPECT_TRUE(status()->download_updates_succeeded());
-
- // Download updates has its own loop in the syncer; it shouldn't factor
- // into HasMoreToSync.
- EXPECT_FALSE(session_->HasMoreToSync());
}
TEST_F(SyncSessionTest, MoreToDownloadIfGotNoChangesRemaining) {
@@ -224,29 +215,6 @@ TEST_F(SyncSessionTest, MoreToDownloadIfGotNoChangesRemaining) {
->set_changes_remaining(0);
EXPECT_TRUE(status()->ServerSaysNothingMoreToDownload());
EXPECT_TRUE(status()->download_updates_succeeded());
-
- // Download updates has its own loop in the syncer; it shouldn't factor
- // into HasMoreToSync.
- EXPECT_FALSE(session_->HasMoreToSync());
-}
-
-TEST_F(SyncSessionTest, MoreToSyncIfConflictsResolved) {
- // Conflict resolution happens after get updates and commit,
- // so we need to loop back and get updates / commit again now
- // that we have made forward progress.
- status()->update_conflicts_resolved(true);
- EXPECT_TRUE(session_->HasMoreToSync());
-}
-
-TEST_F(SyncSessionTest, ResetTransientState) {
- status()->update_conflicts_resolved(true);
- status()->increment_num_successful_commits();
- EXPECT_TRUE(session_->HasMoreToSync());
- session_->PrepareForAnotherSyncCycle();
- EXPECT_EQ(sync_pb::GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION,
- session_->source().updates_source);
- EXPECT_FALSE(status()->conflicts_resolved());
- EXPECT_FALSE(session_->HasMoreToSync());
}
TEST_F(SyncSessionTest, Coalesce) {
« no previous file with comments | « sync/sessions/sync_session.cc ('k') | sync/sessions/test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698