| Index: sync/protocol/proto_value_conversions_unittest.cc
|
| diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc
|
| index fd364501d144a89b61ccbc11c0f60c179dd71cbf..5cc65b74d129890d34265898c24f53b14877fcbc 100644
|
| --- a/sync/protocol/proto_value_conversions_unittest.cc
|
| +++ b/sync/protocol/proto_value_conversions_unittest.cc
|
| @@ -19,6 +19,8 @@
|
| #include "sync/protocol/extension_specifics.pb.h"
|
| #include "sync/protocol/nigori_specifics.pb.h"
|
| #include "sync/protocol/password_specifics.pb.h"
|
| +#include "sync/protocol/per_device_specifics.pb.h"
|
| +#include "sync/protocol/per_user_specifics.pb.h"
|
| #include "sync/protocol/preference_specifics.pb.h"
|
| #include "sync/protocol/search_engine_specifics.pb.h"
|
| #include "sync/protocol/session_specifics.pb.h"
|
| @@ -37,9 +39,8 @@ class ProtoValueConversionsTest : public testing::Test {
|
| DictionaryValue* (*specifics_to_value)(const T&)) {
|
| const T& specifics(T::default_instance());
|
| scoped_ptr<DictionaryValue> value(specifics_to_value(specifics));
|
| - // We can't do much but make sure that the returned value has
|
| - // something in it.
|
| - EXPECT_FALSE(value->empty());
|
| + // We can't do much but make sure that the returned value is not null.
|
| + EXPECT_TRUE(value.get());
|
| }
|
| };
|
|
|
| @@ -47,7 +48,7 @@ TEST_F(ProtoValueConversionsTest, ProtoChangeCheck) {
|
| // If this number changes, that means we added or removed a data
|
| // type. Don't forget to add a unit test for {New
|
| // type}SpecificsToValue below.
|
| - EXPECT_EQ(17, MODEL_TYPE_COUNT);
|
| + EXPECT_EQ(19, MODEL_TYPE_COUNT);
|
|
|
| // We'd also like to check if we changed any field in our messages.
|
| // However, that's hard to do: sizeof could work, but it's
|
| @@ -136,6 +137,14 @@ TEST_F(ProtoValueConversionsTest, PasswordSpecificsToValue) {
|
| TestSpecificsToValue(PasswordSpecificsToValue);
|
| }
|
|
|
| +TEST_F(ProtoValueConversionsTest, PerDeviceSpecificsToValue) {
|
| + TestSpecificsToValue(PerDeviceSpecificsToValue);
|
| +}
|
| +
|
| +TEST_F(ProtoValueConversionsTest, PerUserSpecificsToValue) {
|
| + TestSpecificsToValue(PerUserSpecificsToValue);
|
| +}
|
| +
|
| TEST_F(ProtoValueConversionsTest, PreferenceSpecificsToValue) {
|
| TestSpecificsToValue(PreferenceSpecificsToValue);
|
| }
|
| @@ -174,6 +183,8 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) {
|
| SET_FIELD(extension_setting);
|
| SET_FIELD(nigori);
|
| SET_FIELD(password);
|
| + SET_FIELD(per_device_metadata);
|
| + SET_FIELD(per_user_metadata);
|
| SET_FIELD(preference);
|
| SET_FIELD(search_engine);
|
| SET_FIELD(session);
|
|
|