Index: chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc |
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc |
index b864cbce3e176d44cb91768eb4792c2b19065859..38f10eed4fc3b9ce395abcdab275a3e8de8b3a45 100644 |
--- a/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc |
+++ b/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc |
@@ -42,6 +42,7 @@ |
#include "sync/internal_api/public/util/experiments.h" |
#include "sync/protocol/encryption.pb.h" |
#include "sync/protocol/sync_protocol_error.h" |
+#include "sync/test/callback_counter.h" |
#include "sync/util/test_unrecoverable_error_handler.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -797,6 +798,18 @@ TEST_F(SyncBackendHostTest, DisableThenPurgeType) { |
error_types).Empty()); |
} |
+// Test that a call to ClearServerData is forwarded to the underlying |
+// SyncManager. |
+TEST_F(SyncBackendHostTest, ClearServerDataCallsAreForwarded) { |
+ InitializeBackend(true); |
+ syncer::CallbackCounter callback_counter; |
+ syncer::SyncManager::ClearServerDataCallback callback; |
pavely
2015/07/29 22:57:23
Callback is not used. Remove.
maniscalco
2015/07/29 23:01:09
Good catch! Done.
|
+ backend_->ClearServerData(base::Bind(&syncer::CallbackCounter::Callback, |
+ base::Unretained(&callback_counter))); |
+ fake_manager_->WaitForSyncThread(); |
+ EXPECT_EQ(1, callback_counter.times_called()); |
+} |
+ |
} // namespace |
} // namespace browser_sync |