Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: components/autofill/core/browser/autofill_manager_unittest.cc

Issue 301343002: mac: Clean up autofill integration with Address Book. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@autofill_cleanup2_base
Patch Set: Fix a cross-platform problem. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_manager_unittest.cc
diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc
index 4e3fd92cd8aca8d71cf028bcbf134a0c67d6b1af..18af41e766ae5b766cf2ecd636b6fde1f83506a0 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -1553,7 +1553,7 @@ TEST_F(AutofillManagerTest, FillAddressForm) {
TEST_F(AutofillManagerTest, FillAddressFormFromAuxiliaryProfile) {
personal_data_.ClearAutofillProfiles();
autofill_delegate_.GetPrefs()->SetBoolean(
- ::autofill::prefs::kAutofillAuxiliaryProfilesEnabled, true);
+ ::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled, true);
personal_data_.CreateTestAuxiliaryProfiles();
// Set up our form data.
@@ -2477,24 +2477,24 @@ TEST_F(AutofillManagerTest, FormSubmittedWithDefaultValues) {
// thing on all platforms.
TEST_F(AutofillManagerTest, AuxiliaryProfilesReset) {
PrefService* prefs = autofill_delegate_.GetPrefs();
-#if defined(OS_MACOSX) || defined(OS_ANDROID)
- // Auxiliary profiles is implemented on Mac and Android only.
- // OSX: enables Mac Address Book integration.
+#if defined(OS_ANDROID)
+ // Auxiliary profiles is implemented on Android only.
// Android: enables integration with user's contact profile.
- ASSERT_TRUE(
- prefs->GetBoolean(::autofill::prefs::kAutofillAuxiliaryProfilesEnabled));
- prefs->SetBoolean(
- ::autofill::prefs::kAutofillAuxiliaryProfilesEnabled, false);
- prefs->ClearPref(::autofill::prefs::kAutofillAuxiliaryProfilesEnabled);
- ASSERT_TRUE(
- prefs->GetBoolean(::autofill::prefs::kAutofillAuxiliaryProfilesEnabled));
+ ASSERT_TRUE(prefs->GetBoolean(
+ ::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled));
+ prefs->SetBoolean(::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled,
+ false);
+ prefs->ClearPref(::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled);
+ ASSERT_TRUE(prefs->GetBoolean(
+ ::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled));
#else
- ASSERT_FALSE(
- prefs->GetBoolean(::autofill::prefs::kAutofillAuxiliaryProfilesEnabled));
- prefs->SetBoolean(::autofill::prefs::kAutofillAuxiliaryProfilesEnabled, true);
- prefs->ClearPref(::autofill::prefs::kAutofillAuxiliaryProfilesEnabled);
- ASSERT_FALSE(
- prefs->GetBoolean(::autofill::prefs::kAutofillAuxiliaryProfilesEnabled));
+ ASSERT_FALSE(prefs->GetBoolean(
+ ::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled));
+ prefs->SetBoolean(::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled,
+ true);
+ prefs->ClearPref(::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled);
+ ASSERT_FALSE(prefs->GetBoolean(
+ ::autofill::prefs::kAutofillAndroidAuxiliaryProfilesEnabled));
#endif
}

Powered by Google App Engine
This is Rietveld 408576698