| Index: chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
|
| diff --git a/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc b/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
|
| index e12de05edd0613f56b81f801565f1b445425f50d..f2dea07a9318687d598606034a2753212bb6c4c5 100644
|
| --- a/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
|
| +++ b/chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc
|
| @@ -44,12 +44,11 @@ class MockSyncNotifier : public syncer::SyncNotifier {
|
| MockSyncNotifier() {}
|
| virtual ~MockSyncNotifier() {}
|
|
|
| - MOCK_METHOD1(AddObserver, void(syncer::SyncNotifierObserver*));
|
| - MOCK_METHOD1(RemoveObserver, void(syncer::SyncNotifierObserver*));
|
| + MOCK_METHOD2(UpdateRegisteredIds,
|
| + void(syncer::SyncNotifierObserver*, const syncer::ObjectIdSet&));
|
| MOCK_METHOD1(SetUniqueId, void(const std::string&));
|
| MOCK_METHOD1(SetStateDeprecated, void(const std::string&));
|
| MOCK_METHOD2(UpdateCredentials, void(const std::string&, const std::string&));
|
| - MOCK_METHOD1(UpdateEnabledTypes, void(syncer::ModelTypeSet));
|
| MOCK_METHOD1(SendNotification, void(syncer::ModelTypeSet));
|
| };
|
|
|
| @@ -74,18 +73,11 @@ class BridgedSyncNotifierTest : public testing::Test {
|
| BridgedSyncNotifier bridged_notifier_;
|
| };
|
|
|
| -TEST_F(BridgedSyncNotifierTest, AddObserver) {
|
| +TEST_F(BridgedSyncNotifierTest, UpdateRegisteredIds) {
|
| syncer::MockSyncNotifierObserver observer;
|
| - EXPECT_CALL(mock_bridge_, AddObserver(&observer));
|
| - EXPECT_CALL(*mock_delegate_, AddObserver(&observer));
|
| - bridged_notifier_.AddObserver(&observer);
|
| -}
|
| -
|
| -TEST_F(BridgedSyncNotifierTest, RemoveObserver) {
|
| - syncer::MockSyncNotifierObserver observer;
|
| - EXPECT_CALL(mock_bridge_, RemoveObserver(&observer));
|
| - EXPECT_CALL(*mock_delegate_, RemoveObserver(&observer));
|
| - bridged_notifier_.RemoveObserver(&observer);
|
| + EXPECT_CALL(*mock_delegate_, UpdateRegisteredIds(
|
| + &observer, syncer::ObjectIdSet()));
|
| + bridged_notifier_.UpdateRegisteredIds(&observer, syncer::ObjectIdSet());
|
| }
|
|
|
| TEST_F(BridgedSyncNotifierTest, SetUniqueId) {
|
| @@ -107,13 +99,6 @@ TEST_F(BridgedSyncNotifierTest, UpdateCredentials) {
|
| bridged_notifier_.UpdateCredentials(email, token);
|
| }
|
|
|
| -TEST_F(BridgedSyncNotifierTest, UpdateEnabledTypes) {
|
| - syncer::ModelTypeSet enabled_types(syncer::BOOKMARKS, syncer::PREFERENCES);
|
| - EXPECT_CALL(*mock_delegate_,
|
| - UpdateEnabledTypes(HasModelTypes(enabled_types)));
|
| - bridged_notifier_.UpdateEnabledTypes(enabled_types);
|
| -}
|
| -
|
| TEST_F(BridgedSyncNotifierTest, SendNotification) {
|
| syncer::ModelTypeSet changed_types(syncer::SESSIONS, syncer::EXTENSIONS);
|
| EXPECT_CALL(*mock_delegate_, SendNotification(HasModelTypes(changed_types)));
|
|
|