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

Unified Diff: components/sync/protocol/proto_value_conversions_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/protocol/proto_value_conversions.cc ('k') | components/sync/protocol/protocol.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/protocol/proto_value_conversions_unittest.cc
diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/components/sync/protocol/proto_value_conversions_unittest.cc
similarity index 85%
rename from sync/protocol/proto_value_conversions_unittest.cc
rename to components/sync/protocol/proto_value_conversions_unittest.cc
index c386e108a88339fe80ca291c6e9d2bc6a5be1647..3d4d5704ffaf93b3075304bbc3ff68c4345caf0d 100644
--- a/sync/protocol/proto_value_conversions_unittest.cc
+++ b/components/sync/protocol/proto_value_conversions_unittest.cc
@@ -4,7 +4,7 @@
// Keep this file in sync with the .proto files in this directory.
-#include "sync/protocol/proto_value_conversions.h"
+#include "components/sync/protocol/proto_value_conversions.h"
#include <memory>
#include <string>
@@ -12,33 +12,33 @@
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "base/values.h"
-#include "sync/internal_api/public/base/model_type.h"
-#include "sync/protocol/app_notification_specifics.pb.h"
-#include "sync/protocol/app_setting_specifics.pb.h"
-#include "sync/protocol/app_specifics.pb.h"
-#include "sync/protocol/autofill_specifics.pb.h"
-#include "sync/protocol/bookmark_specifics.pb.h"
-#include "sync/protocol/device_info_specifics.pb.h"
-#include "sync/protocol/encryption.pb.h"
-#include "sync/protocol/experiments_specifics.pb.h"
-#include "sync/protocol/extension_setting_specifics.pb.h"
-#include "sync/protocol/extension_specifics.pb.h"
-#include "sync/protocol/favicon_image_specifics.pb.h"
-#include "sync/protocol/favicon_tracking_specifics.pb.h"
-#include "sync/protocol/managed_user_setting_specifics.pb.h"
-#include "sync/protocol/managed_user_shared_setting_specifics.pb.h"
-#include "sync/protocol/managed_user_specifics.pb.h"
-#include "sync/protocol/managed_user_whitelist_specifics.pb.h"
-#include "sync/protocol/nigori_specifics.pb.h"
-#include "sync/protocol/password_specifics.pb.h"
-#include "sync/protocol/preference_specifics.pb.h"
-#include "sync/protocol/priority_preference_specifics.pb.h"
-#include "sync/protocol/search_engine_specifics.pb.h"
-#include "sync/protocol/session_specifics.pb.h"
-#include "sync/protocol/sync.pb.h"
-#include "sync/protocol/theme_specifics.pb.h"
-#include "sync/protocol/typed_url_specifics.pb.h"
-#include "sync/protocol/wifi_credential_specifics.pb.h"
+#include "components/sync/base/model_type.h"
+#include "components/sync/protocol/app_notification_specifics.pb.h"
+#include "components/sync/protocol/app_setting_specifics.pb.h"
+#include "components/sync/protocol/app_specifics.pb.h"
+#include "components/sync/protocol/autofill_specifics.pb.h"
+#include "components/sync/protocol/bookmark_specifics.pb.h"
+#include "components/sync/protocol/device_info_specifics.pb.h"
+#include "components/sync/protocol/encryption.pb.h"
+#include "components/sync/protocol/experiments_specifics.pb.h"
+#include "components/sync/protocol/extension_setting_specifics.pb.h"
+#include "components/sync/protocol/extension_specifics.pb.h"
+#include "components/sync/protocol/favicon_image_specifics.pb.h"
+#include "components/sync/protocol/favicon_tracking_specifics.pb.h"
+#include "components/sync/protocol/managed_user_setting_specifics.pb.h"
+#include "components/sync/protocol/managed_user_shared_setting_specifics.pb.h"
+#include "components/sync/protocol/managed_user_specifics.pb.h"
+#include "components/sync/protocol/managed_user_whitelist_specifics.pb.h"
+#include "components/sync/protocol/nigori_specifics.pb.h"
+#include "components/sync/protocol/password_specifics.pb.h"
+#include "components/sync/protocol/preference_specifics.pb.h"
+#include "components/sync/protocol/priority_preference_specifics.pb.h"
+#include "components/sync/protocol/search_engine_specifics.pb.h"
+#include "components/sync/protocol/session_specifics.pb.h"
+#include "components/sync/protocol/sync.pb.h"
+#include "components/sync/protocol/theme_specifics.pb.h"
+#include "components/sync/protocol/typed_url_specifics.pb.h"
+#include "components/sync/protocol/wifi_credential_specifics.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
@@ -298,8 +298,8 @@ TEST_F(ProtoValueConversionsTest, WifiCredentialSpecificsToValue) {
TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) {
sync_pb::EntitySpecifics specifics;
- // Touch the extensions to make sure it shows up in the generated
- // value.
+// Touch the extensions to make sure it shows up in the generated
+// value.
#define SET_FIELD(key) (void)specifics.mutable_##key()
SET_FIELD(app);
@@ -342,7 +342,7 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) {
std::unique_ptr<base::DictionaryValue> value(
EntitySpecificsToValue(specifics));
EXPECT_EQ(MODEL_TYPE_COUNT - FIRST_REAL_MODEL_TYPE -
- (LAST_PROXY_TYPE - FIRST_PROXY_TYPE + 1),
+ (LAST_PROXY_TYPE - FIRST_PROXY_TYPE + 1),
static_cast<int>(value->size()));
}
@@ -361,8 +361,7 @@ bool ValueHasSpecifics(const base::DictionaryValue& value,
if (!entities_list->GetDictionary(0, &entry_dictionary))
return false;
- return entry_dictionary->GetDictionary("specifics",
- &specifics_dictionary);
+ return entry_dictionary->GetDictionary("specifics", &specifics_dictionary);
}
} // namespace
@@ -377,14 +376,14 @@ TEST_F(ProtoValueConversionsTest, ClientToServerMessageToValue) {
std::unique_ptr<base::DictionaryValue> value_with_specifics(
ClientToServerMessageToValue(message, true /* include_specifics */));
EXPECT_FALSE(value_with_specifics->empty());
- EXPECT_TRUE(ValueHasSpecifics(*(value_with_specifics.get()),
- "commit.entries"));
+ EXPECT_TRUE(
+ ValueHasSpecifics(*(value_with_specifics.get()), "commit.entries"));
std::unique_ptr<base::DictionaryValue> value_without_specifics(
ClientToServerMessageToValue(message, false /* include_specifics */));
EXPECT_FALSE(value_without_specifics->empty());
- EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()),
- "commit.entries"));
+ EXPECT_FALSE(
+ ValueHasSpecifics(*(value_without_specifics.get()), "commit.entries"));
}
// Create a ClientToServerResponse with an EntitySpecifics. Converting it to
@@ -398,8 +397,8 @@ TEST_F(ProtoValueConversionsTest, ClientToServerResponseToValue) {
std::unique_ptr<base::DictionaryValue> value_with_specifics(
ClientToServerResponseToValue(message, true /* include_specifics */));
EXPECT_FALSE(value_with_specifics->empty());
- EXPECT_TRUE(ValueHasSpecifics(*(value_with_specifics.get()),
- "get_updates.entries"));
+ EXPECT_TRUE(
+ ValueHasSpecifics(*(value_with_specifics.get()), "get_updates.entries"));
std::unique_ptr<base::DictionaryValue> value_without_specifics(
ClientToServerResponseToValue(message, false /* include_specifics */));
« no previous file with comments | « components/sync/protocol/proto_value_conversions.cc ('k') | components/sync/protocol/protocol.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698