| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/ref_counted.h" | 7 #include "base/ref_counted.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/scoped_vector.h" | 9 #include "base/scoped_vector.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 forms.push_back(form); | 1182 forms.push_back(form); |
| 1183 autofill_manager_->FormsSeen(forms); | 1183 autofill_manager_->FormsSeen(forms); |
| 1184 | 1184 |
| 1185 // Submit the form. | 1185 // Submit the form. |
| 1186 autofill_manager_->FormSubmitted(form); | 1186 autofill_manager_->FormSubmitted(form); |
| 1187 | 1187 |
| 1188 // TODO(jhawkins): We can't use the InfoBar anymore to determine if we saved | 1188 // TODO(jhawkins): We can't use the InfoBar anymore to determine if we saved |
| 1189 // fields. Need to query the PDM. | 1189 // fields. Need to query the PDM. |
| 1190 } | 1190 } |
| 1191 | 1191 |
| 1192 // Checks that resetting the auxiliary profile enabled preference does the right |
| 1193 // thing on all platforms. |
| 1194 TEST_F(AutoFillManagerTest, AuxiliaryProfilesReset) { |
| 1195 #if defined(OS_MACOSX) |
| 1196 // Auxiliary profiles is implemented on Mac only. It enables Mac Address |
| 1197 // Book integration. |
| 1198 ASSERT_TRUE(profile()->GetPrefs()->GetBoolean( |
| 1199 prefs::kAutoFillAuxiliaryProfilesEnabled)); |
| 1200 profile()->GetPrefs()->SetBoolean( |
| 1201 prefs::kAutoFillAuxiliaryProfilesEnabled, false); |
| 1202 profile()->GetPrefs()->ClearPref(prefs::kAutoFillAuxiliaryProfilesEnabled); |
| 1203 ASSERT_TRUE(profile()->GetPrefs()->GetBoolean( |
| 1204 prefs::kAutoFillAuxiliaryProfilesEnabled)); |
| 1205 #else |
| 1206 ASSERT_FALSE(profile()->GetPrefs()->GetBoolean( |
| 1207 prefs::kAutoFillAuxiliaryProfilesEnabled)); |
| 1208 profile()->GetPrefs()->SetBoolean( |
| 1209 prefs::kAutoFillAuxiliaryProfilesEnabled, true); |
| 1210 profile()->GetPrefs()->ClearPref(prefs::kAutoFillAuxiliaryProfilesEnabled); |
| 1211 ASSERT_FALSE(profile()->GetPrefs()->GetBoolean( |
| 1212 prefs::kAutoFillAuxiliaryProfilesEnabled)); |
| 1213 #endif |
| 1214 } |
| 1215 |
| 1192 } // namespace | 1216 } // namespace |
| OLD | NEW |