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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_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
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..e01c28fa60aa701f7d8e1d5a580c7863c3cea16d 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,17 @@ 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;
+ 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
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.cc ('k') | chrome/browser/sync/glue/sync_backend_host_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698