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

Unified Diff: sync/api/sync_data_unittest.cc

Issue 213003004: Replace calls to 3-arg SyncData::CreateLocalData with 5-arg version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@syncapi
Patch Set: Forgot a class keyword. Created 6 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/api/sync_data_unittest.cc
diff --git a/sync/api/sync_data_unittest.cc b/sync/api/sync_data_unittest.cc
index 7ca39bf2218942f4c1b6d0d2f9e43e2e6d5f3534..15ef001f07d1cd1a8d1a8e2b4c6015ade098851f 100644
--- a/sync/api/sync_data_unittest.cc
+++ b/sync/api/sync_data_unittest.cc
@@ -34,14 +34,14 @@ class SyncDataTest : public testing::Test {
SyncDataTest()
: attachment_service(FakeAttachmentService::CreateForTest()),
attachment_service_weak_ptr_factory(attachment_service.get()),
- attachment_service_proxy(
+ attachment_service_proxy(new AttachmentServiceProxy(
base::MessageLoopProxy::current(),
- attachment_service_weak_ptr_factory.GetWeakPtr()) {}
+ attachment_service_weak_ptr_factory.GetWeakPtr())) {}
base::MessageLoop loop;
sync_pb::EntitySpecifics specifics;
scoped_ptr<AttachmentService> attachment_service;
base::WeakPtrFactory<AttachmentService> attachment_service_weak_ptr_factory;
- AttachmentServiceProxy attachment_service_proxy;
+ scoped_refptr<AttachmentServiceProxy> attachment_service_proxy;
};
TEST_F(SyncDataTest, NoArgCtor) {
@@ -120,16 +120,6 @@ TEST_F(SyncDataTest, CreateRemoteData) {
EXPECT_TRUE(data.GetAttachmentIds().empty());
}
-TEST_F(SyncDataTest, CreateRemoteData_WithoutAttachmentService) {
- specifics.mutable_preference();
- SyncData data = SyncData::CreateRemoteData(kId, specifics, kLastModifiedTime);
- EXPECT_TRUE(data.IsValid());
- EXPECT_FALSE(data.IsLocal());
- EXPECT_EQ(kId, SyncDataRemote(data).GetId());
- EXPECT_EQ(kLastModifiedTime, SyncDataRemote(data).GetModifiedTime());
- EXPECT_TRUE(data.GetSpecifics().has_preference());
-}
-
// TODO(maniscalco): Add test cases that verify GetLocalAttachmentsForUpload and
// DropAttachments calls are passed through to the underlying AttachmentService.

Powered by Google App Engine
This is Rietveld 408576698