| Index: sync/notifier/p2p_notifier_unittest.cc
|
| diff --git a/sync/notifier/p2p_notifier_unittest.cc b/sync/notifier/p2p_notifier_unittest.cc
|
| index 97033ea72700633003e4b4974993ab09c1fe98b7..2749415616f00101c3017fa5360b0d536dd17529 100644
|
| --- a/sync/notifier/p2p_notifier_unittest.cc
|
| +++ b/sync/notifier/p2p_notifier_unittest.cc
|
| @@ -8,7 +8,7 @@
|
|
|
| #include "jingle/notifier/listener/fake_push_client.h"
|
| #include "sync/internal_api/public/base/model_type.h"
|
| -#include "sync/internal_api/public/base/model_type_payload_map.h"
|
| +#include "sync/internal_api/public/base/model_type_state_map.h"
|
| #include "sync/notifier/mock_sync_notifier_observer.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| @@ -35,8 +35,8 @@ class P2PNotifierTest : public testing::Test {
|
| p2p_notifier_.UnregisterHandler(&mock_observer_);
|
| }
|
|
|
| - ModelTypePayloadMap MakePayloadMap(ModelTypeSet types) {
|
| - return ModelTypePayloadMapFromEnumSet(types, std::string());
|
| + ModelTypeStateMap MakeStateMap(ModelTypeSet types) {
|
| + return ModelTypeStateMapFromEnumSet(types, std::string());
|
| }
|
|
|
| // Simulate receiving all the notifications we sent out since last
|
| @@ -145,7 +145,7 @@ TEST_F(P2PNotifierTest, NotificationsBasic) {
|
|
|
| EXPECT_CALL(mock_observer_, OnNotificationsEnabled());
|
| EXPECT_CALL(mock_observer_, OnIncomingNotification(
|
| - ModelTypePayloadMapToObjectIdPayloadMap(MakePayloadMap(enabled_types)),
|
| + ModelTypeStateMapToObjectIdStateMap(MakeStateMap(enabled_types)),
|
| REMOTE_NOTIFICATION));
|
|
|
| p2p_notifier_.UpdateRegisteredIds(&mock_observer_,
|
| @@ -191,15 +191,15 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
|
| EXPECT_CALL(mock_observer_, OnNotificationsEnabled());
|
| EXPECT_CALL(mock_observer_,
|
| OnIncomingNotification(
|
| - ModelTypePayloadMapToObjectIdPayloadMap(
|
| - MakePayloadMap(enabled_types)),
|
| + ModelTypeStateMapToObjectIdStateMap(
|
| + MakeStateMap(enabled_types)),
|
| REMOTE_NOTIFICATION));
|
|
|
| p2p_notifier_.UpdateRegisteredIds(&mock_observer_,
|
| ModelTypeSetToObjectIdSet(enabled_types));
|
|
|
| - const ModelTypePayloadMap& expected_payload_map =
|
| - MakePayloadMap(expected_types);
|
| + const ModelTypeStateMap& expected_state_map =
|
| + MakeStateMap(expected_types);
|
|
|
| p2p_notifier_.SetUniqueId("sender");
|
| p2p_notifier_.UpdateCredentials("foo@bar.com", "fake_token");
|
| @@ -218,7 +218,7 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
|
| // Should be propagated.
|
| Mock::VerifyAndClearExpectations(&mock_observer_);
|
| EXPECT_CALL(mock_observer_, OnIncomingNotification(
|
| - ModelTypePayloadMapToObjectIdPayloadMap(expected_payload_map),
|
| + ModelTypeStateMapToObjectIdStateMap(expected_state_map),
|
| REMOTE_NOTIFICATION));
|
| p2p_notifier_.SendNotificationDataForTest(
|
| P2PNotificationData("sender", NOTIFY_SELF, changed_types));
|
| @@ -248,7 +248,7 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
|
| // Should be propagated.
|
| Mock::VerifyAndClearExpectations(&mock_observer_);
|
| EXPECT_CALL(mock_observer_, OnIncomingNotification(
|
| - ModelTypePayloadMapToObjectIdPayloadMap(expected_payload_map),
|
| + ModelTypeStateMapToObjectIdStateMap(expected_state_map),
|
| REMOTE_NOTIFICATION));
|
| p2p_notifier_.SendNotificationDataForTest(
|
| P2PNotificationData("sender2", NOTIFY_OTHERS, changed_types));
|
| @@ -265,7 +265,7 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
|
| // Should be propagated.
|
| Mock::VerifyAndClearExpectations(&mock_observer_);
|
| EXPECT_CALL(mock_observer_, OnIncomingNotification(
|
| - ModelTypePayloadMapToObjectIdPayloadMap(expected_payload_map),
|
| + ModelTypeStateMapToObjectIdStateMap(expected_state_map),
|
| REMOTE_NOTIFICATION));
|
| p2p_notifier_.SendNotificationDataForTest(
|
| P2PNotificationData("sender", NOTIFY_ALL, changed_types));
|
| @@ -275,7 +275,7 @@ TEST_F(P2PNotifierTest, SendNotificationData) {
|
| // Should be propagated.
|
| Mock::VerifyAndClearExpectations(&mock_observer_);
|
| EXPECT_CALL(mock_observer_, OnIncomingNotification(
|
| - ModelTypePayloadMapToObjectIdPayloadMap(expected_payload_map),
|
| + ModelTypeStateMapToObjectIdStateMap(expected_state_map),
|
| REMOTE_NOTIFICATION));
|
| p2p_notifier_.SendNotificationDataForTest(
|
| P2PNotificationData("sender2", NOTIFY_ALL, changed_types));
|
|
|