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

Unified Diff: components/sync/engine_impl/sync_manager_impl_unittest.cc

Issue 2563883006: [Sync] Separate purge types step from sync manager configuration. (Closed)
Patch Set: Created 4 years 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 | « components/sync/engine_impl/sync_manager_impl.cc ('k') | components/sync/syncable/directory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/sync_manager_impl_unittest.cc
diff --git a/components/sync/engine_impl/sync_manager_impl_unittest.cc b/components/sync/engine_impl/sync_manager_impl_unittest.cc
index 8bc45bbdf488decd3ba5b5aa249e6f8a296b20b4..5f9db5d87496b9cf1ca89f82dd314c7f339d41fa 100644
--- a/components/sync/engine_impl/sync_manager_impl_unittest.cc
+++ b/components/sync/engine_impl/sync_manager_impl_unittest.cc
@@ -2767,11 +2767,13 @@ TEST_F(SyncManagerTestWithMockScheduler, BasicConfiguration) {
SetProgressMarkerForType(iter.Get(), true);
}
+ sync_manager_.PurgeDisabledTypes(disabled_types, ModelTypeSet(),
+ ModelTypeSet());
CallbackCounter ready_task_counter, retry_task_counter;
sync_manager_.ConfigureSyncer(
- reason, types_to_download, disabled_types, ModelTypeSet(), ModelTypeSet(),
- new_routing_info, base::Bind(&CallbackCounter::Callback,
- base::Unretained(&ready_task_counter)),
+ reason, types_to_download, new_routing_info,
+ base::Bind(&CallbackCounter::Callback,
+ base::Unretained(&ready_task_counter)),
base::Bind(&CallbackCounter::Callback,
base::Unretained(&retry_task_counter)));
EXPECT_EQ(0, ready_task_counter.times_called());
@@ -2822,10 +2824,12 @@ TEST_F(SyncManagerTestWithMockScheduler, ReConfiguration) {
cycle_context()->SetRoutingInfo(old_routing_info);
CallbackCounter ready_task_counter, retry_task_counter;
+ sync_manager_.PurgeDisabledTypes(ModelTypeSet(), ModelTypeSet(),
+ ModelTypeSet());
sync_manager_.ConfigureSyncer(
- reason, types_to_download, ModelTypeSet(), ModelTypeSet(), ModelTypeSet(),
- new_routing_info, base::Bind(&CallbackCounter::Callback,
- base::Unretained(&ready_task_counter)),
+ reason, types_to_download, new_routing_info,
+ base::Bind(&CallbackCounter::Callback,
+ base::Unretained(&ready_task_counter)),
base::Bind(&CallbackCounter::Callback,
base::Unretained(&retry_task_counter)));
EXPECT_EQ(0, ready_task_counter.times_called());
@@ -2908,7 +2912,7 @@ TEST_F(SyncManagerTest, PurgePartiallySyncedTypes) {
pref_hashed_tag, pref_specifics);
// And now, the purge.
- EXPECT_TRUE(sync_manager_.PurgePartiallySyncedTypes());
+ sync_manager_.PurgePartiallySyncedTypes();
// Ensure that autofill lost its progress marker, but preferences did not.
ModelTypeSet empty_tokens =
« no previous file with comments | « components/sync/engine_impl/sync_manager_impl.cc ('k') | components/sync/syncable/directory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698