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

Unified Diff: sync/engine/syncer_unittest.cc

Issue 1246063003: Sync: Don't set/use Parent ID for non-hierarchical sync data types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: sync/engine/syncer_unittest.cc
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 529e1eff7f6e0bde1181598dad6b78468d632f64..dcd326e8c887888ddab0eb867fafb20be8a07bcb 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -4379,11 +4379,17 @@ TEST_F(SyncerTest, EntryWithParentIdUpdatedWithEntryWithoutParentId) {
}
// Add a preference item with explicit parent ID.
- mock_server_->AddUpdatePref(ids_.FromNumber(2).GetServerId(),
- ids_.FromNumber(1).GetServerId(), "tag", 1, 10);
-
- EXPECT_TRUE(SyncShareNudge());
+ {
+ WriteTransaction trans(FROM_HERE, UNITTEST, directory());
+ MutableEntry entry(&trans, CREATE, PREFERENCES, pref_root_id, "tag");
+ ASSERT_TRUE(entry.good());
+ entry.PutIsDir(false);
+ entry.PutBaseVersion(1);
+ entry.PutUniqueClientTag("tag");
+ entry.PutId(ids_.FromNumber(2));
+ }
+ // Verify the entry above.
{
syncable::ReadTransaction trans(FROM_HERE, directory());
Entry pref_entry(&trans, GET_BY_CLIENT_TAG, "tag");

Powered by Google App Engine
This is Rietveld 408576698