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 |