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

Unified Diff: sync/protocol/proto_enum_conversions_unittest.cc

Issue 9663023: Log the sync communication that happens between client and server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 8 years, 9 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/protocol/proto_enum_conversions_unittest.cc
diff --git a/sync/protocol/proto_enum_conversions_unittest.cc b/sync/protocol/proto_enum_conversions_unittest.cc
index 2445a30cd84e937c72e7b4092ff91fd64a620eb0..91498e7272f02263ebad54a59a0f27eb9ccb2ab4 100644
--- a/sync/protocol/proto_enum_conversions_unittest.cc
+++ b/sync/protocol/proto_enum_conversions_unittest.cc
@@ -58,5 +58,32 @@ TEST_F(ProtoEnumConversionsTest, GetUpdatesSourceString) {
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource_MAX);
}
+TEST_F(ProtoEnumConversionsTest, GetResponseTypeString) {
+ TestEnumStringFunction(
+ GetResponseTypeString,
+ sync_pb::CommitResponse::ResponseType_MIN,
+ sync_pb::CommitResponse::ResponseType_MAX);
+}
+
+TEST_F(ProtoEnumConversionsTest, GetErrorTypeString) {
+ // We have a gap, so we need to do two ranges.
+ TestEnumStringFunction(
+ GetErrorTypeString,
+ sync_pb::SyncEnums::ErrorType_MIN,
+ sync_pb::SyncEnums::MIGRATION_DONE);
+ TestEnumStringFunction(
+ GetErrorTypeString,
+ sync_pb::SyncEnums::UNKNOWN,
+ sync_pb::SyncEnums::ErrorType_MAX);
+
+}
+
+TEST_F(ProtoEnumConversionsTest, GetActionString) {
+ TestEnumStringFunction(
+ GetActionString,
+ sync_pb::ClientToServerResponse::Error::Action_MIN,
+ sync_pb::ClientToServerResponse::Error::Action_MAX);
+}
+
} // namespace
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698