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

Side by Side Diff: chrome/browser/autofill/autofill_merge_unittest.cc

Issue 7892048: Autofill: Remove fax number completely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix. Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 21 matching lines...) Expand all
32 NAME_MIDDLE, 32 NAME_MIDDLE,
33 NAME_LAST, 33 NAME_LAST,
34 EMAIL_ADDRESS, 34 EMAIL_ADDRESS,
35 COMPANY_NAME, 35 COMPANY_NAME,
36 ADDRESS_HOME_LINE1, 36 ADDRESS_HOME_LINE1,
37 ADDRESS_HOME_LINE2, 37 ADDRESS_HOME_LINE2,
38 ADDRESS_HOME_CITY, 38 ADDRESS_HOME_CITY,
39 ADDRESS_HOME_STATE, 39 ADDRESS_HOME_STATE,
40 ADDRESS_HOME_ZIP, 40 ADDRESS_HOME_ZIP,
41 ADDRESS_HOME_COUNTRY, 41 ADDRESS_HOME_COUNTRY,
42 PHONE_HOME_WHOLE_NUMBER, 42 PHONE_HOME_WHOLE_NUMBER
43 PHONE_FAX_WHOLE_NUMBER,
44 }; 43 };
45 44
46 // Serializes the |profiles| into a string. 45 // Serializes the |profiles| into a string.
47 std::string SerializeProfiles(const std::vector<AutofillProfile*>& profiles) { 46 std::string SerializeProfiles(const std::vector<AutofillProfile*>& profiles) {
48 std::string result; 47 std::string result;
49 for (size_t i = 0; i < profiles.size(); ++i) { 48 for (size_t i = 0; i < profiles.size(); ++i) {
50 result += kProfileSeparator; 49 result += kProfileSeparator;
51 result += "\n"; 50 result += "\n";
52 for (size_t j = 0; j < arraysize(kProfileFieldTypes); ++j) { 51 for (size_t j = 0; j < arraysize(kProfileFieldTypes); ++j) {
53 AutofillFieldType type = kProfileFieldTypes[j]; 52 AutofillFieldType type = kProfileFieldTypes[j];
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 210 }
212 } 211 }
213 212
214 *merged_profiles = SerializeProfiles(personal_data_->web_profiles()); 213 *merged_profiles = SerializeProfiles(personal_data_->web_profiles());
215 } 214 }
216 215
217 TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) { 216 TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) {
218 RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName), 217 RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName),
219 kFileNamePattern); 218 kFileNamePattern);
220 } 219 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager_unittest.cc ('k') | chrome/browser/autofill/autofill_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698