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

Unified Diff: components/sync/test/engine/test_syncable_utils.cc

Issue 2580033002: [Sync] Ensure that CONFIGURE_CLEAN types get unapplied before 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
Index: components/sync/test/engine/test_syncable_utils.cc
diff --git a/components/sync/test/engine/test_syncable_utils.cc b/components/sync/test/engine/test_syncable_utils.cc
index f3c6007ed0dab057fcc93b2c64dc1df6fb03633f..5761cd5da5b87deec51baae8fa96bf4cfb1121f6 100644
--- a/components/sync/test/engine/test_syncable_utils.cc
+++ b/components/sync/test/engine/test_syncable_utils.cc
@@ -66,6 +66,10 @@ Id GetOnlyEntryWithName(BaseTransaction* rtrans,
void CreateTypeRoot(WriteTransaction* trans,
syncable::Directory* dir,
ModelType type) {
+ // Root node for this type shouldn't exist yet.
+ Entry same_type_root(trans, GET_TYPE_ROOT, type);
+ DCHECK(!same_type_root.good());
+
std::string tag_name = ModelTypeToRootTag(type);
syncable::MutableEntry node(trans, syncable::CREATE, type,
TestIdFactory::root(), tag_name);

Powered by Google App Engine
This is Rietveld 408576698