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

Unified Diff: sync/sessions/model_type_registry_unittest.cc

Issue 260613002: sync: Expose DirectoryDebugInfoEmitters in engine (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment Created 6 years, 8 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 | « sync/sessions/model_type_registry.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/model_type_registry_unittest.cc
diff --git a/sync/sessions/model_type_registry_unittest.cc b/sync/sessions/model_type_registry_unittest.cc
index 0248e8d7f86e831aad7e18e0f9b69fdc034cac6e..375e84b53bb66de76a7a2b3c672cb7d6c8337038 100644
--- a/sync/sessions/model_type_registry_unittest.cc
+++ b/sync/sessions/model_type_registry_unittest.cc
@@ -113,6 +113,24 @@ TEST_F(ModelTypeRegistryTest, SetEnabledDirectoryTypes_Clear) {
registry()->SetEnabledDirectoryTypes(routing_info2);
}
+// Test disabling then re-enabling some directory types.
+//
+// We don't get to inspect any of the state we're modifying. This test is
+// useful only for detecting crashes or memory leaks.
+TEST_F(ModelTypeRegistryTest, SetEnabledDirectoryTypes_OffAndOn) {
+ ModelSafeRoutingInfo routing_info1;
+ routing_info1.insert(std::make_pair(NIGORI, GROUP_PASSIVE));
+ routing_info1.insert(std::make_pair(BOOKMARKS, GROUP_UI));
+ routing_info1.insert(std::make_pair(AUTOFILL, GROUP_DB));
+
+ registry()->SetEnabledDirectoryTypes(routing_info1);
+
+ ModelSafeRoutingInfo routing_info2;
+ registry()->SetEnabledDirectoryTypes(routing_info2);
+
+ registry()->SetEnabledDirectoryTypes(routing_info1);
+}
+
TEST_F(ModelTypeRegistryTest, NonBlockingTypes) {
NonBlockingTypeProcessor themes_processor(syncer::THEMES);
NonBlockingTypeProcessor sessions_processor(syncer::SESSIONS);
« no previous file with comments | « sync/sessions/model_type_registry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698