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

Unified Diff: sync/api/attachments/attachment_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
« no previous file with comments | « sync/api/attachments/attachment_metadata_unittest.cc ('k') | sync/api/sync_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/api/attachments/attachment_unittest.cc
diff --git a/sync/api/attachments/attachment_unittest.cc b/sync/api/attachments/attachment_unittest.cc
index 49b4cabf1ac847e59fa8cbd500871aa18f38fa44..cd1e3e4ca7c7113f414a02ed256540139c099f7b 100644
--- a/sync/api/attachments/attachment_unittest.cc
+++ b/sync/api/attachments/attachment_unittest.cc
@@ -38,11 +38,11 @@ TEST_F(AttachmentTest, Create_WithEmptyData) {
}
TEST_F(AttachmentTest, CreateFromParts_HappyCase) {
- AttachmentId id = AttachmentId::Create();
scoped_refptr<base::RefCountedString> some_data(new base::RefCountedString);
some_data->data() = kAttachmentData;
uint32_t crc32c = ComputeCrc32c(some_data);
- Attachment a = Attachment::CreateFromParts(id, some_data, crc32c);
+ AttachmentId id = AttachmentId::Create(some_data->size(), crc32c);
+ Attachment a = Attachment::CreateFromParts(id, some_data);
EXPECT_EQ(id, a.GetId());
EXPECT_EQ(some_data, a.GetData());
}
« no previous file with comments | « sync/api/attachments/attachment_metadata_unittest.cc ('k') | sync/api/sync_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698