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

Side by Side Diff: chrome/renderer/autofill/form_manager_browsertest.cc

Issue 7541059: When an element has multiple labels for Autofill, separate them with spaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/string16.h" 7 #include "base/string16.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/renderer/autofill/form_manager.h" 10 #include "chrome/renderer/autofill/form_manager.h"
(...skipping 3192 matching lines...) Expand 10 before | Expand all | Expand 10 after
3203 std::vector<string16> labels, names, values; 3203 std::vector<string16> labels, names, values;
3204 3204
3205 labels.push_back(ASCIIToUTF16("First Name:")); 3205 labels.push_back(ASCIIToUTF16("First Name:"));
3206 names.push_back(ASCIIToUTF16("firstname")); 3206 names.push_back(ASCIIToUTF16("firstname"));
3207 values.push_back(ASCIIToUTF16("John")); 3207 values.push_back(ASCIIToUTF16("John"));
3208 3208
3209 labels.push_back(ASCIIToUTF16("Last Name:")); 3209 labels.push_back(ASCIIToUTF16("Last Name:"));
3210 names.push_back(ASCIIToUTF16("lastname")); 3210 names.push_back(ASCIIToUTF16("lastname"));
3211 values.push_back(ASCIIToUTF16("Smith")); 3211 values.push_back(ASCIIToUTF16("Smith"));
3212 3212
3213 labels.push_back(ASCIIToUTF16("Email:xxx@yyy.com")); 3213 labels.push_back(ASCIIToUTF16("Email: xxx@yyy.com"));
3214 names.push_back(ASCIIToUTF16("email")); 3214 names.push_back(ASCIIToUTF16("email"));
3215 values.push_back(ASCIIToUTF16("john@example.com")); 3215 values.push_back(ASCIIToUTF16("john@example.com"));
3216 3216
3217 ExpectLabels( 3217 ExpectLabels(
3218 "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">" 3218 "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
3219 " <LABEL for=\"firstname\"> First Name: </LABEL>" 3219 " <LABEL for=\"firstname\"> First Name: </LABEL>"
3220 " <LABEL for=\"firstname\"></LABEL>" 3220 " <LABEL for=\"firstname\"></LABEL>"
3221 " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>" 3221 " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
3222 " <LABEL for=\"lastname\"></LABEL>" 3222 " <LABEL for=\"lastname\"></LABEL>"
3223 " <LABEL for=\"lastname\"> Last Name: </LABEL>" 3223 " <LABEL for=\"lastname\"> Last Name: </LABEL>"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
3316 WebInputElement::defaultMaxLength(), 3316 WebInputElement::defaultMaxLength(),
3317 false))); 3317 false)));
3318 EXPECT_TRUE(fields[2].StrictlyEqualsHack( 3318 EXPECT_TRUE(fields[2].StrictlyEqualsHack(
3319 FormField(string16(), 3319 FormField(string16(),
3320 ASCIIToUTF16("country"), 3320 ASCIIToUTF16("country"),
3321 ASCIIToUTF16("AL"), 3321 ASCIIToUTF16("AL"),
3322 ASCIIToUTF16("select-one"), 3322 ASCIIToUTF16("select-one"),
3323 0, 3323 0,
3324 false))); 3324 false)));
3325 } 3325 }
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/form_manager.cc ('k') | chrome/test/data/autofill/heuristics/output/06_checkout_sears.com.out » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698