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

Unified Diff: chrome/browser/autofill/autofill_manager_unittest.cc

Issue 3054019: Reset to defaults failed to reset the Autofill/Mac/Address Book card preference (Closed)
Patch Set: Addressing review comments. Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/options_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager_unittest.cc
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index 6cceed99f08ecf98706e6d08fecefb1fe4614bda..a7c8f3a37201b617bd85da9e7356c8e98813a380 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -1189,4 +1189,28 @@ TEST_F(AutoFillManagerTest, HiddenFields) {
// fields. Need to query the PDM.
}
+// Checks that resetting the auxiliary profile enabled preference does the right
+// thing on all platforms.
+TEST_F(AutoFillManagerTest, AuxiliaryProfilesReset) {
+#if defined(OS_MACOSX)
+ // Auxiliary profiles is implemented on Mac only. It enables Mac Address
+ // Book integration.
+ ASSERT_TRUE(profile()->GetPrefs()->GetBoolean(
+ prefs::kAutoFillAuxiliaryProfilesEnabled));
+ profile()->GetPrefs()->SetBoolean(
+ prefs::kAutoFillAuxiliaryProfilesEnabled, false);
+ profile()->GetPrefs()->ClearPref(prefs::kAutoFillAuxiliaryProfilesEnabled);
+ ASSERT_TRUE(profile()->GetPrefs()->GetBoolean(
+ prefs::kAutoFillAuxiliaryProfilesEnabled));
+#else
+ ASSERT_FALSE(profile()->GetPrefs()->GetBoolean(
+ prefs::kAutoFillAuxiliaryProfilesEnabled));
+ profile()->GetPrefs()->SetBoolean(
+ prefs::kAutoFillAuxiliaryProfilesEnabled, true);
+ profile()->GetPrefs()->ClearPref(prefs::kAutoFillAuxiliaryProfilesEnabled);
+ ASSERT_FALSE(profile()->GetPrefs()->GetBoolean(
+ prefs::kAutoFillAuxiliaryProfilesEnabled));
+#endif
+}
+
} // namespace
« no previous file with comments | « no previous file | chrome/browser/options_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698