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

Unified Diff: chrome/browser/sync/glue/generic_change_processor_unittest.cc

Issue 23129007: sync: Add GetAllSyncData to sync/api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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: chrome/browser/sync/glue/generic_change_processor_unittest.cc
diff --git a/chrome/browser/sync/glue/generic_change_processor_unittest.cc b/chrome/browser/sync/glue/generic_change_processor_unittest.cc
index 27bda381aa83e285bd54f80e0ff7b4b14a114464..74c3409764f52ab80fdaec7d3ed4a7c75a554d1d 100644
--- a/chrome/browser/sync/glue/generic_change_processor_unittest.cc
+++ b/chrome/browser/sync/glue/generic_change_processor_unittest.cc
@@ -111,6 +111,23 @@ TEST_F(SyncGenericChangeProcessorTest, StressGetSyncDataForType) {
}
}
+// Similar to above, but focused on the method that implements sync/api
+// interfaces and is hence exposed to datatypes directly.
+TEST_F(SyncGenericChangeProcessorTest, StressGetAllSyncData) {
+ const int kNumChildNodes = 1000;
+ const int kRepeatCount = 1;
+
+ ASSERT_NO_FATAL_FAILURE(BuildChildNodes(kNumChildNodes));
+
+ for (int i = 0; i < kRepeatCount; ++i) {
+ syncer::SyncDataList sync_data =
+ change_processor()->GetAllSyncData(kType);
+
+ // Start with a simple test. We can add more in-depth testing later.
+ EXPECT_EQ(static_cast<size_t>(kNumChildNodes), sync_data.size());
+ }
+}
+
TEST_F(SyncGenericChangeProcessorTest, SetGetPasswords) {
const int kNumPasswords = 10;
sync_pb::PasswordSpecificsData password_data;

Powered by Google App Engine
This is Rietveld 408576698