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

Unified Diff: sync/engine/syncer_unittest.cc

Issue 10917234: sync: make scheduling logic and job ownership more obvious. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eof 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/engine/syncer.cc ('k') | sync/internal_api/js_sync_manager_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_unittest.cc
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 5f0a8f3661e9eaedbd339405de5fdaf8b7bc0af1..54d0eeca4714ed67fa64fec082f69fc0d1d411e8 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -186,24 +186,24 @@ class SyncerTest : public testing::Test,
info, workers);
}
- void SyncShareAsDelegate(
- SyncSchedulerImpl::SyncSessionJob::SyncSessionJobPurpose purpose) {
+
+ void SyncShareAsDelegate(SyncSessionJob::Purpose purpose) {
SyncerStep start;
SyncerStep end;
- SyncSchedulerImpl::SetSyncerStepsForPurpose(purpose, &start, &end);
+ SyncSessionJob::GetSyncerStepsForPurpose(purpose, &start, &end);
session_.reset(MakeSession());
- syncer_->SyncShare(session_.get(), start, end);
+ EXPECT_TRUE(syncer_->SyncShare(session_.get(), start, end));
}
void SyncShareNudge() {
session_.reset(MakeSession());
- SyncShareAsDelegate(SyncSchedulerImpl::SyncSessionJob::NUDGE);
+ SyncShareAsDelegate(SyncSessionJob::NUDGE);
}
void SyncShareConfigure() {
session_.reset(MakeSession());
- SyncShareAsDelegate(SyncSchedulerImpl::SyncSessionJob::CONFIGURATION);
+ SyncShareAsDelegate(SyncSessionJob::CONFIGURATION);
}
virtual void SetUp() {
@@ -2538,7 +2538,6 @@ TEST_F(SyncerTest, CommitManyItemsInOneGo_PostBufferFail) {
SyncShareNudge();
EXPECT_EQ(1U, mock_server_->commit_messages().size());
- EXPECT_FALSE(session_->Succeeded());
EXPECT_EQ(SYNC_SERVER_ERROR,
session_->status_controller().model_neutral_state().commit_result);
EXPECT_EQ(items_to_commit - kDefaultMaxCommitBatchSize,
@@ -2569,7 +2568,7 @@ TEST_F(SyncerTest, CommitManyItemsInOneGo_CommitConflict) {
// We should stop looping at the first sign of trouble.
EXPECT_EQ(1U, mock_server_->commit_messages().size());
- EXPECT_FALSE(session_->Succeeded());
+ EXPECT_FALSE(session_->HasMoreToSync());
EXPECT_EQ(items_to_commit - (kDefaultMaxCommitBatchSize - 1),
directory()->unsynced_entity_count());
}
« no previous file with comments | « sync/engine/syncer.cc ('k') | sync/internal_api/js_sync_manager_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698