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

Unified Diff: components/autofill/core/browser/autofill_test_utils.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: Autofill test failures on Android. Undo a change to autofill_test_utils.cc. Created 6 years, 6 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_test_utils.cc
diff --git a/components/autofill/core/browser/autofill_test_utils.cc b/components/autofill/core/browser/autofill_test_utils.cc
index 081defa337a6781650b195de46a744b8207b6b3f..0393d867e922b5bda1fe673bddaa2d63decb46ee 100644
--- a/components/autofill/core/browser/autofill_test_utils.cc
+++ b/components/autofill/core/browser/autofill_test_utils.cc
@@ -206,12 +206,17 @@ void DisableSystemServices(PrefService* prefs) {
// Use a mock Keychain rather than the OS one to store credit card data.
#if defined(OS_MACOSX)
OSCrypt::UseMockKeychain(true);
-#endif
+#endif // defined(OS_MACOSX)
- // Disable auxiliary profiles for unit testing. These reach out to system
- // services on the Mac.
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ // Don't use the Address Book on Mac, as it reaches out to system services.
+ if (prefs)
+ prefs->SetBoolean(prefs::kAutofillUseMacAddressBook, false);
+#else
+ // Disable auxiliary profiles for unit testing by default.
if (prefs)
prefs->SetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled, false);
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
}
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698