| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/sync/api/sync_data.h" | 5 #include "components/sync/api/sync_data.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/memory/ref_counted_memory.h" | 12 #include "base/memory/ref_counted_memory.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "components/sync/api/attachments/attachment_id.h" | 16 #include "components/sync/api/attachments/attachment_id.h" |
| 17 #include "components/sync/core/attachments/attachment_service.h" | 17 #include "components/sync/core/attachments/attachment_service.h" |
| 18 #include "components/sync/core/attachments/attachment_service_impl.h" | 18 #include "components/sync/core/attachments/attachment_service_impl.h" |
| 19 #include "components/sync/core/attachments/attachment_service_proxy.h" | 19 #include "components/sync/core/attachments/attachment_service_proxy.h" |
| 20 #include "components/sync/protocol/sync.pb.h" | 20 #include "components/sync/protocol/sync.pb.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 using std::string; | 23 using std::string; |
| 24 | 24 |
| 25 namespace syncer { | 25 namespace syncer { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const char kSyncTag[] = "3984729834"; | 29 const char kSyncTag[] = "3984729834"; |
| 30 const ModelType kDatatype = PREFERENCES; | 30 const ModelType kDatatype = syncer::PREFERENCES; |
| 31 const char kNonUniqueTitle[] = "my preference"; | 31 const char kNonUniqueTitle[] = "my preference"; |
| 32 const int64_t kId = 439829; | 32 const int64_t kId = 439829; |
| 33 const base::Time kLastModifiedTime = base::Time(); | 33 const base::Time kLastModifiedTime = base::Time(); |
| 34 | 34 |
| 35 class SyncDataTest : public testing::Test { | 35 class SyncDataTest : public testing::Test { |
| 36 protected: | 36 protected: |
| 37 SyncDataTest() | 37 SyncDataTest() |
| 38 : attachment_service(AttachmentServiceImpl::CreateForTest()), | 38 : attachment_service(AttachmentServiceImpl::CreateForTest()), |
| 39 attachment_service_weak_ptr_factory(attachment_service.get()), | 39 attachment_service_weak_ptr_factory(attachment_service.get()), |
| 40 attachment_service_proxy( | 40 attachment_service_proxy( |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 EXPECT_TRUE(data.GetSpecifics().has_preference()); | 117 EXPECT_TRUE(data.GetSpecifics().has_preference()); |
| 118 EXPECT_TRUE(data.GetAttachmentIds().empty()); | 118 EXPECT_TRUE(data.GetAttachmentIds().empty()); |
| 119 } | 119 } |
| 120 | 120 |
| 121 // TODO(maniscalco): Add test cases that verify GetLocalAttachmentsForUpload | 121 // TODO(maniscalco): Add test cases that verify GetLocalAttachmentsForUpload |
| 122 // calls are passed through to the underlying AttachmentService. | 122 // calls are passed through to the underlying AttachmentService. |
| 123 | 123 |
| 124 } // namespace | 124 } // namespace |
| 125 | 125 |
| 126 } // namespace syncer | 126 } // namespace syncer |
| OLD | NEW |