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

Unified Diff: sync/protocol/proto_value_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_value_conversions_unittest.cc
diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc
index 3d96378722f1684a1c95764f69d7f9b35344dd0b..440b9af4300c58803cf6947cdc1210685361d0a4 100644
--- a/sync/protocol/proto_value_conversions_unittest.cc
+++ b/sync/protocol/proto_value_conversions_unittest.cc
@@ -187,5 +187,27 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) {
static_cast<int>(value->size()));
}
+TEST_F(ProtoValueConversionsTest, ClientToServerMessageToValue) {
+ sync_pb::ClientToServerMessage message;
akalin 2012/03/17 01:55:05 You should put a specifics in this message, and te
lipalani1 2012/03/19 19:24:37 Done.
+ scoped_ptr<DictionaryValue> value_with_specifics(
+ ClientToServerMessageToValue(message, true /* include_specifics */));
+ EXPECT_FALSE(value_with_specifics->empty());
+
+ scoped_ptr<DictionaryValue> value_without_specifics(
+ ClientToServerMessageToValue(message, false /* include_specifics */));
+ EXPECT_FALSE(value_without_specifics->empty());
+}
+
+TEST_F(ProtoValueConversionsTest, ClientToServerResponseToValue) {
+ sync_pb::ClientToServerResponse message;
+ scoped_ptr<DictionaryValue> value_with_specifics(
akalin 2012/03/17 01:55:05 same here
lipalani1 2012/03/19 19:24:37 Done.
+ ClientToServerResponseToValue(message, true /* include_specifics */));
+ EXPECT_FALSE(value_with_specifics->empty());
+
+ scoped_ptr<DictionaryValue> value_without_specifics(
+ ClientToServerResponseToValue(message, false /* include_specifics */));
+ EXPECT_FALSE(value_without_specifics->empty());
+}
+
} // namespace
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698