Chromium Code Reviews| Index: chrome/browser/sync/test/integration/passwords_helper.cc |
| diff --git a/chrome/browser/sync/test/integration/passwords_helper.cc b/chrome/browser/sync/test/integration/passwords_helper.cc |
| index 6a3fb0fe7af79225d16e0fa4f175f0ac6f3d3acf..0dee0eb574541ee52884a5b7323506d7bc6d1700 100644 |
| --- a/chrome/browser/sync/test/integration/passwords_helper.cc |
| +++ b/chrome/browser/sync/test/integration/passwords_helper.cc |
| @@ -64,6 +64,16 @@ class PasswordStoreConsumerHelper |
| DISALLOW_COPY_AND_ASSIGN(PasswordStoreConsumerHelper); |
| }; |
| +// PasswordForm::date_synced is a local field. Therefore it may be different |
| +// across clients. |
| +void ClearSyncDateField(std::vector<PasswordForm>* forms) { |
| + for (std::vector<PasswordForm>::iterator it = forms->begin(); |
| + it != forms->end(); |
| + ++it) { |
| + it->date_synced = base::Time(); |
| + } |
| +} |
| + |
| } // namespace |
| namespace passwords_helper { |
| @@ -137,6 +147,7 @@ bool ProfileContainsSamePasswordFormsAsVerifier(int index) { |
| std::vector<PasswordForm> forms; |
| GetLogins(GetVerifierPasswordStore(), verifier_forms); |
| GetLogins(GetPasswordStore(index), forms); |
| + ClearSyncDateField(&forms); |
| bool result = |
| password_manager::ContainsSamePasswordForms(verifier_forms, forms); |
|
Nicolas Zea
2014/06/17 21:41:11
Does it make sense to modify this method instead t
vasilii
2014/06/18 10:00:57
ContainsSamePasswordForms() resides in components/
|
| if (!result) { |
| @@ -159,6 +170,8 @@ bool ProfilesContainSamePasswordForms(int index_a, int index_b) { |
| std::vector<PasswordForm> forms_b; |
| GetLogins(GetPasswordStore(index_a), forms_a); |
| GetLogins(GetPasswordStore(index_b), forms_b); |
| + ClearSyncDateField(&forms_a); |
| + ClearSyncDateField(&forms_b); |
| bool result = password_manager::ContainsSamePasswordForms(forms_a, forms_b); |
| if (!result) { |
| LOG(ERROR) << "Password forms in Profile" << index_a << ":"; |