| Index: components/password_manager/core/browser/password_syncable_service_unittest.cc
|
| diff --git a/components/password_manager/core/browser/password_syncable_service_unittest.cc b/components/password_manager/core/browser/password_syncable_service_unittest.cc
|
| index 0817b3a2f72580825dc0ba6caf46c3cde89402d7..78a43917660ce6fdfcd6e4eff66ce01501bf4936 100644
|
| --- a/components/password_manager/core/browser/password_syncable_service_unittest.cc
|
| +++ b/components/password_manager/core/browser/password_syncable_service_unittest.cc
|
| @@ -86,6 +86,8 @@ class MockPasswordSyncableService : public PasswordSyncableService {
|
|
|
| MOCK_METHOD1(NotifyPasswordStoreOfLoginChanges,
|
| void (const PasswordStoreChangeList&));
|
| +
|
| + MOCK_METHOD1(StartSyncFlare, void(syncer::ModelType));
|
| };
|
|
|
| // Class to verify the arguments passed to |PasswordStore|.
|
| @@ -610,4 +612,23 @@ TEST_F(PasswordSyncableServiceTest, MergeDataAndPushBack) {
|
| scoped_ptr<syncer::SyncErrorFactory>());
|
| }
|
|
|
| +// Calls ActOnPasswordStoreChanges without SyncChangeProcessor. StartSyncFlare
|
| +// should be called.
|
| +TEST_F(PasswordSyncableServiceTest, StartSyncFlare) {
|
| + autofill::PasswordForm form;
|
| + form.signon_realm = "abc";
|
| + PasswordStoreChangeList list;
|
| + list.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
|
| +
|
| + // No flare and no SyncChangeProcessor, the call shouldn't crash.
|
| + service()->ActOnPasswordStoreChanges(list);
|
| +
|
| + // Set the flare. It should be called as there is no SyncChangeProcessor.
|
| + service()->InjectStartSyncFlare(
|
| + base::Bind(&MockPasswordSyncableService::StartSyncFlare,
|
| + base::Unretained(service())));
|
| + EXPECT_CALL(*service(), StartSyncFlare(syncer::PASSWORDS));
|
| + service()->ActOnPasswordStoreChanges(list);
|
| +}
|
| +
|
| } // namespace
|
|
|