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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/options_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« 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