Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / sync / engine / syncer_unittest.cc
index a8e7c02..2be9dab 100644 (file)
@@ -151,9 +151,8 @@ class SyncerTest : public testing::Test,
     last_client_invalidation_hint_buffer_size_ = size;
   }
   virtual void OnReceivedGuRetryDelay(const base::TimeDelta& delay) OVERRIDE {}
-  virtual void OnSyncProtocolError(
-      const sessions::SyncSessionSnapshot& snapshot) OVERRIDE {
-  }
+  virtual void OnReceivedMigrationRequest(ModelTypeSet types) OVERRIDE {}
+  virtual void OnSyncProtocolError(const SyncProtocolError& error) OVERRIDE {}
 
   void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) {
     // We're just testing the sync engine here, so we shunt everything to
@@ -164,13 +163,13 @@ class SyncerTest : public testing::Test,
     }
   }
 
-  virtual void OnSyncEngineEvent(const SyncEngineEvent& event) OVERRIDE {
+  virtual void OnSyncCycleEvent(const SyncCycleEvent& event) OVERRIDE {
     DVLOG(1) << "HandleSyncEngineEvent in unittest " << event.what_happened;
     // we only test for entry-specific events, not status changed ones.
     switch (event.what_happened) {
-      case SyncEngineEvent::SYNC_CYCLE_BEGIN: // Fall through.
-      case SyncEngineEvent::STATUS_CHANGED:
-      case SyncEngineEvent::SYNC_CYCLE_ENDED:
+      case SyncCycleEvent::SYNC_CYCLE_BEGIN: // Fall through.
+      case SyncCycleEvent::STATUS_CHANGED:
+      case SyncCycleEvent::SYNC_CYCLE_ENDED:
         return;
       default:
         CHECK(false) << "Handling unknown error type in unit tests!!";
@@ -178,6 +177,11 @@ class SyncerTest : public testing::Test,
     saw_syncer_event_ = true;
   }
 
+  virtual void OnActionableError(const SyncProtocolError& error) OVERRIDE {}
+  virtual void OnRetryTimeChanged(base::Time retry_time) OVERRIDE {}
+  virtual void OnThrottledTypesChanged(ModelTypeSet throttled_types) OVERRIDE {}
+  virtual void OnMigrationRequested(ModelTypeSet types) OVERRIDE {}
+
   void ResetSession() {
     session_.reset(SyncSession::Build(context_.get(), this));
   }
@@ -469,10 +473,10 @@ class SyncerTest : public testing::Test,
   void ConfigureNoGetUpdatesRequired() {
     context_->set_server_enabled_pre_commit_update_avoidance(true);
     nudge_tracker_.OnInvalidationsEnabled();
-    nudge_tracker_.RecordSuccessfulSyncCycle(base::TimeTicks::Now());
+    nudge_tracker_.RecordSuccessfulSyncCycle();
 
     ASSERT_FALSE(context_->ShouldFetchUpdatesBeforeCommit());
-    ASSERT_FALSE(nudge_tracker_.IsGetUpdatesRequired(base::TimeTicks::Now()));
+    ASSERT_FALSE(nudge_tracker_.IsGetUpdatesRequired());
   }
 
   base::MessageLoop message_loop_;