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

Unified Diff: sync/internal_api/sync_manager_impl_unittest.cc

Issue 1253743003: [Sync] Update SyncBackendHost to forward ClearServerData to SyncManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clearserverdatacommand
Patch Set: Remove unused callback variable Created 5 years, 5 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/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/sync_rollback_manager_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager_impl_unittest.cc
diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc
index 84389e639c7b2370060dbbda5255be150cc63661..e276a735bf0445f92197d809708eeabb522ee525 100644
--- a/sync/internal_api/sync_manager_impl_unittest.cc
+++ b/sync/internal_api/sync_manager_impl_unittest.cc
@@ -2661,6 +2661,16 @@ TEST_F(SyncManagerTestWithMockScheduler, ReConfiguration) {
ProtocolTypes()).Equals(disabled_types));
}
+// Test that SyncManager::ClearServerData invokes the scheduler.
+TEST_F(SyncManagerTestWithMockScheduler, ClearServerData) {
+ EXPECT_CALL(*scheduler(), Start(SyncScheduler::CLEAR_SERVER_DATA_MODE, _));
+ CallbackCounter callback_counter;
+ sync_manager_.ClearServerData(base::Bind(
+ &CallbackCounter::Callback, base::Unretained(&callback_counter)));
+ PumpLoop();
+ EXPECT_EQ(1, callback_counter.times_called());
+}
+
// Test that PurgePartiallySyncedTypes purges only those types that have not
// fully completed their initial download and apply.
TEST_F(SyncManagerTest, PurgePartiallySyncedTypes) {
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/sync_rollback_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698