| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Keep this file in sync with the .proto files in this directory. | 5 // Keep this file in sync with the .proto files in this directory. |
| 6 | 6 |
| 7 #include "sync/protocol/proto_value_conversions.h" | 7 #include "sync/protocol/proto_value_conversions.h" |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 TEST_F(ProtoValueConversionsTest, ExtensionSettingSpecificsToValue) { | 137 TEST_F(ProtoValueConversionsTest, ExtensionSettingSpecificsToValue) { |
| 138 TestSpecificsToValue(ExtensionSettingSpecificsToValue); | 138 TestSpecificsToValue(ExtensionSettingSpecificsToValue); |
| 139 } | 139 } |
| 140 | 140 |
| 141 TEST_F(ProtoValueConversionsTest, ExtensionSpecificsToValue) { | 141 TEST_F(ProtoValueConversionsTest, ExtensionSpecificsToValue) { |
| 142 TestSpecificsToValue(ExtensionSpecificsToValue); | 142 TestSpecificsToValue(ExtensionSpecificsToValue); |
| 143 } | 143 } |
| 144 | 144 |
| 145 TEST_F(ProtoValueConversionsTest, HistoryDeleteDirectiveSpecificsToValue) { |
| 146 TestSpecificsToValue(HistoryDeleteDirectiveSpecificsToValue); |
| 147 } |
| 148 |
| 145 TEST_F(ProtoValueConversionsTest, NigoriSpecificsToValue) { | 149 TEST_F(ProtoValueConversionsTest, NigoriSpecificsToValue) { |
| 146 TestSpecificsToValue(NigoriSpecificsToValue); | 150 TestSpecificsToValue(NigoriSpecificsToValue); |
| 147 } | 151 } |
| 148 | 152 |
| 149 TEST_F(ProtoValueConversionsTest, PasswordSpecificsToValue) { | 153 TEST_F(ProtoValueConversionsTest, PasswordSpecificsToValue) { |
| 150 TestSpecificsToValue(PasswordSpecificsToValue); | 154 TestSpecificsToValue(PasswordSpecificsToValue); |
| 151 } | 155 } |
| 152 | 156 |
| 153 TEST_F(ProtoValueConversionsTest, DeviceInfoSpecificsToValue) { | 157 TEST_F(ProtoValueConversionsTest, DeviceInfoSpecificsToValue) { |
| 154 TestSpecificsToValue(DeviceInfoSpecificsToValue); | 158 TestSpecificsToValue(DeviceInfoSpecificsToValue); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 183 #define SET_FIELD(key) (void)specifics.mutable_##key() | 187 #define SET_FIELD(key) (void)specifics.mutable_##key() |
| 184 | 188 |
| 185 SET_FIELD(app); | 189 SET_FIELD(app); |
| 186 SET_FIELD(app_notification); | 190 SET_FIELD(app_notification); |
| 187 SET_FIELD(app_setting); | 191 SET_FIELD(app_setting); |
| 188 SET_FIELD(autofill); | 192 SET_FIELD(autofill); |
| 189 SET_FIELD(autofill_profile); | 193 SET_FIELD(autofill_profile); |
| 190 SET_FIELD(bookmark); | 194 SET_FIELD(bookmark); |
| 191 SET_FIELD(extension); | 195 SET_FIELD(extension); |
| 192 SET_FIELD(extension_setting); | 196 SET_FIELD(extension_setting); |
| 197 SET_FIELD(history_delete_directive); |
| 193 SET_FIELD(nigori); | 198 SET_FIELD(nigori); |
| 194 SET_FIELD(password); | 199 SET_FIELD(password); |
| 195 SET_FIELD(device_info); | 200 SET_FIELD(device_info); |
| 196 SET_FIELD(preference); | 201 SET_FIELD(preference); |
| 197 SET_FIELD(search_engine); | 202 SET_FIELD(search_engine); |
| 198 SET_FIELD(session); | 203 SET_FIELD(session); |
| 199 SET_FIELD(theme); | 204 SET_FIELD(theme); |
| 200 SET_FIELD(typed_url); | 205 SET_FIELD(typed_url); |
| 201 | 206 |
| 202 #undef SET_FIELD | 207 #undef SET_FIELD |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 268 |
| 264 scoped_ptr<DictionaryValue> value_without_specifics( | 269 scoped_ptr<DictionaryValue> value_without_specifics( |
| 265 ClientToServerResponseToValue(message, false /* include_specifics */)); | 270 ClientToServerResponseToValue(message, false /* include_specifics */)); |
| 266 EXPECT_FALSE(value_without_specifics->empty()); | 271 EXPECT_FALSE(value_without_specifics->empty()); |
| 267 EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()), | 272 EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()), |
| 268 "get_updates.entries")); | 273 "get_updates.entries")); |
| 269 } | 274 } |
| 270 | 275 |
| 271 } // namespace | 276 } // namespace |
| 272 } // namespace syncer | 277 } // namespace syncer |
| OLD | NEW |