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

Unified Diff: sync/internal_api/public/base/attachment_id_proto_unittest.cc

Issue 982883002: [Sync] Add size and crc32c to AttachmentId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master. Created 5 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/internal_api/public/base/attachment_id_proto_unittest.cc
diff --git a/sync/internal_api/public/base/attachment_id_proto_unittest.cc b/sync/internal_api/public/base/attachment_id_proto_unittest.cc
index 5321e2b7e92acb86338347f85bde32da9974cf37..2f9d3f037e74e9018341d10c293f9f2a17eaac2a 100644
--- a/sync/internal_api/public/base/attachment_id_proto_unittest.cc
+++ b/sync/internal_api/public/base/attachment_id_proto_unittest.cc
@@ -15,7 +15,7 @@ typedef testing::Test AttachmentIdProtoTest;
// Verify that that we generate a proto with a properly formatted unique_id
// field.
TEST(AttachmentIdProtoTest, UniqueIdFormat) {
- sync_pb::AttachmentIdProto id_proto = CreateAttachmentIdProto();
+ sync_pb::AttachmentIdProto id_proto = CreateAttachmentIdProto(0, 0);
ASSERT_TRUE(id_proto.has_unique_id());
// gtest's regular expression support is pretty poor so we cannot test as
// closely as we would like.
@@ -35,9 +35,9 @@ TEST(AttachmentIdProtoTest, CreateAttachmentMetadata_Empty) {
TEST(AttachmentIdProtoTest, CreateAttachmentMetadata_NonEmpty) {
google::protobuf::RepeatedPtrField<sync_pb::AttachmentIdProto> ids;
- *ids.Add() = CreateAttachmentIdProto();
- *ids.Add() = CreateAttachmentIdProto();
- *ids.Add() = CreateAttachmentIdProto();
+ *ids.Add() = CreateAttachmentIdProto(0, 0);
+ *ids.Add() = CreateAttachmentIdProto(0, 0);
+ *ids.Add() = CreateAttachmentIdProto(0, 0);
sync_pb::AttachmentMetadata metadata = CreateAttachmentMetadata(ids);
ASSERT_EQ(3, metadata.record_size());
for (int i = 0; i < metadata.record_size(); ++i) {
« no previous file with comments | « sync/internal_api/public/base/attachment_id_proto.cc ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698