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

Side by Side Diff: components/autofill/core/browser/autofill_merge_unittest.cc

Issue 365783002: Autofill: don't require POST method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove method_ member Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <map> 5 #include <map>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 void AutofillMergeTest::MergeProfiles(const std::string& profiles, 180 void AutofillMergeTest::MergeProfiles(const std::string& profiles,
181 std::string* merged_profiles) { 181 std::string* merged_profiles) {
182 // Start with no saved profiles. 182 // Start with no saved profiles.
183 personal_data_.Reset(); 183 personal_data_.Reset();
184 184
185 // Create a test form. 185 // Create a test form.
186 FormData form; 186 FormData form;
187 form.name = base::ASCIIToUTF16("MyTestForm"); 187 form.name = base::ASCIIToUTF16("MyTestForm");
188 form.method = base::ASCIIToUTF16("POST");
189 form.origin = GURL("https://www.example.com/origin.html"); 188 form.origin = GURL("https://www.example.com/origin.html");
190 form.action = GURL("https://www.example.com/action.html"); 189 form.action = GURL("https://www.example.com/action.html");
191 form.user_submitted = true; 190 form.user_submitted = true;
192 191
193 // Parse the input line by line. 192 // Parse the input line by line.
194 std::vector<std::string> lines; 193 std::vector<std::string> lines;
195 Tokenize(profiles, "\n", &lines); 194 Tokenize(profiles, "\n", &lines);
196 for (size_t i = 0; i < lines.size(); ++i) { 195 for (size_t i = 0; i < lines.size(); ++i) {
197 std::string line = lines[i]; 196 std::string line = lines[i];
198 197
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 ServerFieldType AutofillMergeTest::StringToFieldType(const std::string& str) { 243 ServerFieldType AutofillMergeTest::StringToFieldType(const std::string& str) {
245 return string_to_field_type_map_[str]; 244 return string_to_field_type_map_[str];
246 } 245 }
247 246
248 TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) { 247 TEST_F(AutofillMergeTest, DataDrivenMergeProfiles) {
249 RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName), 248 RunDataDrivenTest(GetInputDirectory(kTestName), GetOutputDirectory(kTestName),
250 kFileNamePattern); 249 kFileNamePattern);
251 } 250 }
252 251
253 } // namespace autofill 252 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698