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

Unified Diff: sync/engine/syncer_unittest.cc

Issue 398813005: [Sync] Rely on directory to decide which types need to be purged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc ('k') | sync/syncable/directory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_unittest.cc
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 6f891e8df77f6b98b4a7f8abf4435f11c107c5f9..160ed9c7150307c9572ba61c72b8940171397ed9 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -1037,6 +1037,10 @@ TEST_F(SyncerTest, TestPurgeWhileUnsynced) {
// Similar to above, but throw a purge operation into the mix. Bug 49278.
syncable::Id pref_node_id = TestIdFactory::MakeServer("Tim");
{
+ directory()->SetDownloadProgress(BOOKMARKS,
+ syncable::BuildProgress(BOOKMARKS));
+ directory()->SetDownloadProgress(PREFERENCES,
+ syncable::BuildProgress(PREFERENCES));
WriteTransaction wtrans(FROM_HERE, UNITTEST, directory());
MutableEntry parent(&wtrans, CREATE, BOOKMARKS, wtrans.root_id(), "Pete");
ASSERT_TRUE(parent.good());
@@ -1086,6 +1090,8 @@ TEST_F(SyncerTest, TestPurgeWhileUnsynced) {
TEST_F(SyncerTest, TestPurgeWhileUnapplied) {
// Similar to above, but for unapplied items. Bug 49278.
{
+ directory()->SetDownloadProgress(BOOKMARKS,
+ syncable::BuildProgress(BOOKMARKS));
WriteTransaction wtrans(FROM_HERE, UNITTEST, directory());
MutableEntry parent(&wtrans, CREATE, BOOKMARKS, wtrans.root_id(), "Pete");
ASSERT_TRUE(parent.good());
@@ -1111,6 +1117,8 @@ TEST_F(SyncerTest, TestPurgeWhileUnapplied) {
TEST_F(SyncerTest, TestPurgeWithJournal) {
{
+ directory()->SetDownloadProgress(BOOKMARKS,
+ syncable::BuildProgress(BOOKMARKS));
WriteTransaction wtrans(FROM_HERE, UNITTEST, directory());
MutableEntry parent(&wtrans, syncable::CREATE, BOOKMARKS, wtrans.root_id(),
"Pete");
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc ('k') | sync/syncable/directory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698