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

Unified Diff: chrome/renderer/autofill/form_autofill_browsertest.cc

Issue 1003163003: Autofill: Search for standalone label tags while looking through divs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, correspondingControl Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/autofill/heuristics/input/bug_465587.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/form_autofill_browsertest.cc
diff --git a/chrome/renderer/autofill/form_autofill_browsertest.cc b/chrome/renderer/autofill/form_autofill_browsertest.cc
index 0032cf071b3b3c9644b07bc30bae8504d2ae6244..84f5efa7d20f3130b5bb0534a11e16d913783494 100644
--- a/chrome/renderer/autofill/form_autofill_browsertest.cc
+++ b/chrome/renderer/autofill/form_autofill_browsertest.cc
@@ -3397,6 +3397,27 @@ TEST_F(FormAutofillTest, LabelsInferredFromDivSiblingTable) {
"</FORM>");
}
+TEST_F(FormAutofillTest, LabelsInferredFromLabelInDivTable) {
+ ExpectJohnSmithLabels(
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ "<LABEL>First name:</LABEL>"
+ "<LABEL for='lastname'>Last name:</LABEL>"
+ "<DIV>"
+ " <INPUT type='text' id='firstname' value='John'>"
+ "</DIV>"
+ "<DIV>"
+ " <INPUT type='text' id='lastname' value='Smith'>"
+ "</DIV>"
+ "<LABEL>Email:</LABEL>"
+ "<DIV>"
+ " <SPAN>"
+ " <INPUT type='text' id='email' value='john@example.com'>"
+ " </SPAN>"
+ "</DIV>"
+ "<input type='submit' name='reply-send' value='Send'>"
+ "</FORM>");
+}
+
TEST_F(FormAutofillTest, LabelsInferredFromDefinitionListRatherThanDivTable) {
ExpectJohnSmithLabels(
"<FORM name='TestForm' action='http://cnn.com' method='post'>"
« no previous file with comments | « no previous file | chrome/test/data/autofill/heuristics/input/bug_465587.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698