Index: components/autofill/core/browser/autofill_test_utils.cc |
diff --git a/components/autofill/core/browser/autofill_test_utils.cc b/components/autofill/core/browser/autofill_test_utils.cc |
index 922eff7357fc0b503782ce8c0ba6c0962966fd4c..c69611a46711a272b5a1f8b747db88b8163849c0 100644 |
--- a/components/autofill/core/browser/autofill_test_utils.cc |
+++ b/components/autofill/core/browser/autofill_test_utils.cc |
@@ -19,6 +19,7 @@ |
#include "components/autofill/core/common/form_field_data.h" |
#include "components/os_crypt/os_crypt.h" |
#include "components/pref_registry/pref_registry_syncable.h" |
+#include "components/signin/core/browser/account_tracker_service.h" |
#include "components/signin/core/common/signin_pref_names.h" |
using base::ASCIIToUTF16; |
@@ -40,8 +41,19 @@ scoped_ptr<PrefService> PrefServiceForTesting() { |
// PDM depends on this pref, which is normally registered in |
// SigninManagerFactory. |
registry->RegisterStringPref( |
- ::prefs::kGoogleServicesUsername, std::string(), |
+ ::prefs::kGoogleServicesAccountId, std::string(), |
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
+ |
+ // PDM depends on these prefs, which are normally registered in |
+ // AccountTrackerServiceFactory. |
+ registry->RegisterListPref( |
+ AccountTrackerService::kAccountInfoPref, |
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
+ registry->RegisterIntegerPref( |
+ ::prefs::kAccountIdMigrationState, |
+ AccountTrackerService::MIGRATION_NOT_STARTED, |
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
+ |
base::PrefServiceFactory factory; |
factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore())); |
return factory.Create(registry.get()); |