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

Unified Diff: components/sync/api/sync_change_unittest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 | « components/sync/api/sync_change_processor_wrapper_for_test.cc ('k') | components/sync/api/sync_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/api/sync_change_unittest.cc
diff --git a/sync/api/sync_change_unittest.cc b/components/sync/api/sync_change_unittest.cc
similarity index 76%
rename from sync/api/sync_change_unittest.cc
rename to components/sync/api/sync_change_unittest.cc
index 84f39716908ab68bf09ff2daf919c79fe44767da..df5601d01b4f0601ad6128282e20014cee7a1499 100644
--- a/sync/api/sync_change_unittest.cc
+++ b/components/sync/api/sync_change_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/api/sync_change.h"
+#include "components/sync/api/sync_change.h"
#include <memory>
#include <string>
@@ -10,11 +10,11 @@
#include "base/message_loop/message_loop.h"
#include "base/time/time.h"
#include "base/values.h"
-#include "sync/api/attachments/attachment_id.h"
-#include "sync/internal_api/public/attachments/attachment_service_proxy_for_test.h"
-#include "sync/protocol/preference_specifics.pb.h"
-#include "sync/protocol/proto_value_conversions.h"
-#include "sync/protocol/sync.pb.h"
+#include "components/sync/api/attachments/attachment_id.h"
+#include "components/sync/core/attachments/attachment_service_proxy_for_test.h"
+#include "components/sync/protocol/preference_specifics.pb.h"
+#include "components/sync/protocol/proto_value_conversions.h"
+#include "components/sync/protocol/sync.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
@@ -32,8 +32,7 @@ class SyncChangeTest : public testing::Test {
TEST_F(SyncChangeTest, LocalDelete) {
SyncChange::SyncChangeType change_type = SyncChange::ACTION_DELETE;
std::string tag = "client_tag";
- SyncChange e(FROM_HERE,
- change_type,
+ SyncChange e(FROM_HERE, change_type,
SyncData::CreateLocalDelete(tag, PREFERENCES));
EXPECT_EQ(change_type, e.change_type());
EXPECT_EQ(tag, SyncDataLocal(e.sync_data()).GetTag());
@@ -47,8 +46,7 @@ TEST_F(SyncChangeTest, LocalUpdate) {
pref_specifics->set_name("test");
std::string tag = "client_tag";
std::string title = "client_title";
- SyncChange e(FROM_HERE,
- change_type,
+ SyncChange e(FROM_HERE, change_type,
SyncData::CreateLocalData(tag, title, specifics));
EXPECT_EQ(change_type, e.change_type());
EXPECT_EQ(tag, SyncDataLocal(e.sync_data()).GetTag());
@@ -68,8 +66,7 @@ TEST_F(SyncChangeTest, LocalAdd) {
pref_specifics->set_name("test");
std::string tag = "client_tag";
std::string title = "client_title";
- SyncChange e(FROM_HERE,
- change_type,
+ SyncChange e(FROM_HERE, change_type,
SyncData::CreateLocalData(tag, title, specifics));
EXPECT_EQ(change_type, e.change_type());
EXPECT_EQ(tag, SyncDataLocal(e.sync_data()).GetTag());
@@ -90,43 +87,31 @@ TEST_F(SyncChangeTest, SyncerChanges) {
sync_pb::PreferenceSpecifics* pref_specifics =
update_specifics.mutable_preference();
pref_specifics->set_name("update");
- change_list.push_back(
- SyncChange(FROM_HERE,
- SyncChange::ACTION_UPDATE,
- SyncData::CreateRemoteData(
- 1,
- update_specifics,
- base::Time(),
- syncer::AttachmentIdList(),
- syncer::AttachmentServiceProxyForTest::Create())));
+ change_list.push_back(SyncChange(
+ FROM_HERE, SyncChange::ACTION_UPDATE,
+ SyncData::CreateRemoteData(
+ 1, update_specifics, base::Time(), syncer::AttachmentIdList(),
+ syncer::AttachmentServiceProxyForTest::Create())));
// Create an add.
sync_pb::EntitySpecifics add_specifics;
pref_specifics = add_specifics.mutable_preference();
pref_specifics->set_name("add");
change_list.push_back(
- SyncChange(FROM_HERE,
- SyncChange::ACTION_ADD,
+ SyncChange(FROM_HERE, SyncChange::ACTION_ADD,
SyncData::CreateRemoteData(
- 2,
- add_specifics,
- base::Time(),
- syncer::AttachmentIdList(),
+ 2, add_specifics, base::Time(), syncer::AttachmentIdList(),
syncer::AttachmentServiceProxyForTest::Create())));
// Create a delete.
sync_pb::EntitySpecifics delete_specifics;
pref_specifics = delete_specifics.mutable_preference();
pref_specifics->set_name("add");
- change_list.push_back(
- SyncChange(FROM_HERE,
- SyncChange::ACTION_DELETE,
- SyncData::CreateRemoteData(
- 3,
- delete_specifics,
- base::Time(),
- syncer::AttachmentIdList(),
- syncer::AttachmentServiceProxyForTest::Create())));
+ change_list.push_back(SyncChange(
+ FROM_HERE, SyncChange::ACTION_DELETE,
+ SyncData::CreateRemoteData(
+ 3, delete_specifics, base::Time(), syncer::AttachmentIdList(),
+ syncer::AttachmentServiceProxyForTest::Create())));
ASSERT_EQ(3U, change_list.size());
« no previous file with comments | « components/sync/api/sync_change_processor_wrapper_for_test.cc ('k') | components/sync/api/sync_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698