[go: up one dir, main page]

Autofill: Improve finding labels for checkable fields.

Unlike most fields, checkboxes have associated text in the next siblings. We should search in that direction first, instead of searching the previous siblings like we do for other fields.

BUG=454366
Review URL: https://codereview.chromium.org/895363008

Cr-Commit-Position: refs/heads/master@{#315669}
(cherry picked from commit d67d3f49f99d88cdd3d43d6e2ec418412655cf91)

Review URL: https://codereview.chromium.org/929293003

Cr-Commit-Position: refs/branch-heads/2272@{#309}
Cr-Branched-From: 827a380cfdb31aa54c8d56e63ce2c3fd8c3ba4d4-refs/heads/master@{#310958}
diff --git a/chrome/test/data/autofill/heuristics/output/02_checkout_advanceautoparts.com.out b/chrome/test/data/autofill/heuristics/output/02_checkout_advanceautoparts.com.out
index 1768f09..90f00068 100644
--- a/chrome/test/data/autofill/heuristics/output/02_checkout_advanceautoparts.com.out
+++ b/chrome/test/data/autofill/heuristics/output/02_checkout_advanceautoparts.com.out
@@ -1,4 +1,4 @@
-UNKNOWN_TYPE | billingShippingSame | Billing AddressUse form below for your billing address:* required fields*First Name: | false | billingShippingSame_1-default
+UNKNOWN_TYPE | billingShippingSame | Make shipping the same as my billing address | false | billingShippingSame_1-default
 NAME_FIRST | billFirstName | *First Name: |  | billingShippingSame_1-default
 NAME_LAST | billLastName | *Last Name: |  | billingShippingSame_1-default
 ADDRESS_HOME_LINE1 | billAddress1 | *Street Address 1: |  | billingShippingSame_1-default
@@ -10,7 +10,7 @@
 PHONE_HOME_NUMBER | billDayPhonePart2 | ) |  | billingShippingSame_1-default
 PHONE_HOME_NUMBER | billDayPhonePart3 | *Day Phone: |  | billingShippingSame_1-default
 EMAIL_ADDRESS | billEmail | *Email Address: |  | billingShippingSame_1-default
-UNKNOWN_TYPE | sendMeEmail | *Email Address: | checked | billingShippingSame_1-default
+UNKNOWN_TYPE | sendMeEmail | Yes, please send me emails about news, special offers, exclusives and promotions from Advance Auto Parts. See our | checked | billingShippingSame_1-default
 UNKNOWN_TYPE | billPassword | Password: |  | billingShippingSame_1-default
 UNKNOWN_TYPE | billPasswordVerify | Confirm Password: |  | billingShippingSame_1-default
 NAME_FIRST | shipFirstName | *First Name: |  | shipFirstName_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/02_checkout_bedbathandbeyond.com.out b/chrome/test/data/autofill/heuristics/output/02_checkout_bedbathandbeyond.com.out
index 08ee466..a7ade04 100644
--- a/chrome/test/data/autofill/heuristics/output/02_checkout_bedbathandbeyond.com.out
+++ b/chrome/test/data/autofill/heuristics/output/02_checkout_bedbathandbeyond.com.out
@@ -20,7 +20,7 @@
 EMAIL_ADDRESS | retype_email_addr | *Re-type email |  | first_nm_1-default
 UNKNOWN_TYPE | promo_email_flag | Receive information on special offers and new arrivals at Bed Bath & Beyond. | Y | first_nm_1-default
 UNKNOWN_TYPE | mobile_offers_opt_in | Bed Bath & Beyond may deliver mobile offers and promotions via text message in the future. Check the box if you would like to receive these mobile offers and promotions on your mobile phone. View our Privacy policy. Message & data rates may apply. | Y | first_nm_1-default
-UNKNOWN_TYPE | shipping_options | Shipping | B | first_nm_1-default
+UNKNOWN_TYPE | shipping_options | Same as billing information | B | first_nm_1-default
 NAME_FIRST | ship_first_nm | *First name |  | ship_first_nm_1-default
 NAME_MIDDLE | ship_mid_nm | Middle name |  | ship_first_nm_1-default
 NAME_LAST | ship_last_nm | *Last name |  | ship_first_nm_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/03_checkout_cduniverse.com.out b/chrome/test/data/autofill/heuristics/output/03_checkout_cduniverse.com.out
index 3e63981..c2e739c 100644
--- a/chrome/test/data/autofill/heuristics/output/03_checkout_cduniverse.com.out
+++ b/chrome/test/data/autofill/heuristics/output/03_checkout_cduniverse.com.out
@@ -17,6 +17,6 @@
 ADDRESS_HOME_STATE | HT_Ship_State | State/Province |  | HT_Ship_Address1_1-default
 ADDRESS_HOME_ZIP | HT_Ship_Zip | Zip/Postal Code |  | HT_Ship_Address1_1-default
 ADDRESS_HOME_COUNTRY | HT_Ship_Country | Country |  | HT_Ship_Address1_1-default
-UNKNOWN_TYPE | HT_OK_to_email | Would it be OK if occasionally we notified you of special sales via email? | -1 | HT_Ship_Address1_1-default
-UNKNOWN_TYPE | HT_OK_to_email | Yes | 0 | HT_Ship_Address1_1-default
-UNKNOWN_TYPE | HT_PrefersHTML | Would it be OK if occasionally we notified you of special sales via email? | on | HT_Ship_Address1_1-default
+UNKNOWN_TYPE | HT_OK_to_email | Yes | -1 | HT_Ship_Address1_1-default
+UNKNOWN_TYPE | HT_OK_to_email | No | 0 | HT_Ship_Address1_1-default
+UNKNOWN_TYPE | HT_PrefersHTML | I prefer to receive HTML formatted email when available. | on | HT_Ship_Address1_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/03_checkout_crutchfield.com.out b/chrome/test/data/autofill/heuristics/output/03_checkout_crutchfield.com.out
index 486bf8cad..916931b9 100644
--- a/chrome/test/data/autofill/heuristics/output/03_checkout_crutchfield.com.out
+++ b/chrome/test/data/autofill/heuristics/output/03_checkout_crutchfield.com.out
@@ -9,8 +9,8 @@
 PHONE_HOME_WHOLE_NUMBER | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$billphone2 | Billing Phone |  | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$firstname_1-default
 EMAIL_ADDRESS | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$email2 | Email |  | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$firstname_1-default
 UNKNOWN_TYPE | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$chbox2 | Send me exclusive offers, deals and expert reviews. | on | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$firstname_1-default
-UNKNOWN_TYPE | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$same | Shipping Address | same | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$firstname_1-default
-UNKNOWN_TYPE | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$giftOrder | Shipping Address | gift | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$firstname_1-default
+UNKNOWN_TYPE | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$same | Same as billing address. | same | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$firstname_1-default
+UNKNOWN_TYPE | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$giftOrder | Prices will not appear on invoice. This order is a gift. | gift | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$firstname_1-default
 NAME_FIRST | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$shippingFirstname | First Name |  | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$shippingFirstname_1-default
 NAME_MIDDLE_INITIAL | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$shippingMi | M.I. |  | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$shippingFirstname_1-default
 NAME_LAST | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$shippingLastname | Last Name |  | ctl00$ctl00$MainContentPlaceHolder$MainContentPlaceHolder$shippingFirstname_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/03_checkout_homedepot.com.out b/chrome/test/data/autofill/heuristics/output/03_checkout_homedepot.com.out
index 8f7b907..df4e302 100644
--- a/chrome/test/data/autofill/heuristics/output/03_checkout_homedepot.com.out
+++ b/chrome/test/data/autofill/heuristics/output/03_checkout_homedepot.com.out
@@ -11,4 +11,4 @@
 PHONE_HOME_CITY_CODE | altfieldphone1_1 | Alternate Phone: |  | firstName_1_1-default
 PHONE_HOME_NUMBER | altfieldphone2_1 | Alternate Phone: |  | firstName_1_1-default
 PHONE_HOME_NUMBER | altfieldphone3_1 | Alternate Phone: |  | firstName_1_1-default
-UNKNOWN_TYPE | isBillingAddress_1 | Alternate Phone: | on | firstName_1_1-default
+UNKNOWN_TYPE | isBillingAddress_1 | Check here if the above shipping address is | on | firstName_1_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/03_checkout_hsn.com.out b/chrome/test/data/autofill/heuristics/output/03_checkout_hsn.com.out
index 886e757..caa43c6 100644
--- a/chrome/test/data/autofill/heuristics/output/03_checkout_hsn.com.out
+++ b/chrome/test/data/autofill/heuristics/output/03_checkout_hsn.com.out
@@ -1,4 +1,4 @@
-UNKNOWN_TYPE | Body$BillingIsShippingCheckboxB | Enter billing information (as it appears on your statement) | on | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | Body$BillingIsShippingCheckboxB | Use my billing address as my shipping address. | on | Body$BillingIsShippingCheckboxB_1-default
 NAME_FIRST | Body$BillingAddress$_firstName | First Name |  | Body$BillingIsShippingCheckboxB_1-default
 NAME_LAST | Body$BillingAddress$_lastName | Last Name |  | Body$BillingIsShippingCheckboxB_1-default
 ADDRESS_HOME_LINE1 | Body$BillingAddress$_address1 | Address Line 1 |  | Body$BillingIsShippingCheckboxB_1-default
@@ -14,10 +14,10 @@
 UNKNOWN_TYPE | Body$BillingAddress$rdoAlt1 |  | H | Body$BillingIsShippingCheckboxB_1-default
 UNKNOWN_TYPE | Body$BillingAddress$rdoAlt1 |  | M | Body$BillingIsShippingCheckboxB_1-default
 UNKNOWN_TYPE | Body$BillingAddress$rdoAlt1 |  | W | Body$BillingIsShippingCheckboxB_1-default
-UNKNOWN_TYPE | Body$MobileAlerts | Enter billing information (as it appears on your statement) | on | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | Body$MobileAlerts | Send me special promotion mobile alerts | on | Body$BillingIsShippingCheckboxB_1-default
 EMAIL_ADDRESS | Body$NewEmailAddress2 | Email Address |  | Body$BillingIsShippingCheckboxB_1-default
-UNKNOWN_TYPE | Body$WeeklyNewsletterSignup12 | Email Address | on | Body$BillingIsShippingCheckboxB_1-default
-UNKNOWN_TYPE | Body$TSNewsletterSignup2 | Email Address | on | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | Body$WeeklyNewsletterSignup12 | Email me weekly HSN newsletters and special offers | on | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | Body$TSNewsletterSignup2 | Email me the daily Today's Special | on | Body$BillingIsShippingCheckboxB_1-default
 NAME_FIRST | Body$ShippingAddress$_firstName | First Name |  | Body$BillingIsShippingCheckboxB_1-default
 NAME_LAST | Body$ShippingAddress$_lastName | Last Name |  | Body$BillingIsShippingCheckboxB_1-default
 ADDRESS_HOME_LINE1 | Body$ShippingAddress$_address1 | Address Line 1 |  | Body$BillingIsShippingCheckboxB_1-default
@@ -26,15 +26,15 @@
 ADDRESS_HOME_STATE | Body$ShippingAddress$_state | State |    | Body$BillingIsShippingCheckboxB_1-default
 ADDRESS_HOME_ZIP | Body$ShippingAddress$_zipcode | Zip Code |  | Body$BillingIsShippingCheckboxB_1-default
 PHONE_HOME_WHOLE_NUMBER | Body$ShippingAddress$_telephone | Phone Number |  | Body$BillingIsShippingCheckboxB_1-default
-UNKNOWN_TYPE | PaymentTypeSelection |  | 0 | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | PaymentTypeSelection | Pay with a Credit or Debit Card | 0 | Body$BillingIsShippingCheckboxB_1-default
 CREDIT_CARD_NUMBER | Body$CCNumber | Card Number |  | Body$BillingIsShippingCheckboxB_1-cc
 CREDIT_CARD_EXP_MONTH | Body$CCExpirationDateMonth | Expiration Date | 0 | Body$BillingIsShippingCheckboxB_1-cc
 CREDIT_CARD_EXP_4_DIGIT_YEAR | Body$CCExpirationDateYear | Expiration Date | 0 | Body$BillingIsShippingCheckboxB_1-cc
 CREDIT_CARD_NAME | Body$CCNameOnCard | Name on Card |  | Body$BillingIsShippingCheckboxB_1-cc
-UNKNOWN_TYPE | IsDebitCard | Is this a Debit Card? | 1 | Body$BillingIsShippingCheckboxB_1-default
-UNKNOWN_TYPE | IsDebitCard | Yes | 0 | Body$BillingIsShippingCheckboxB_1-default
-UNKNOWN_TYPE | Body$SaveCC4Later | Is this a Debit Card? | on | Body$BillingIsShippingCheckboxB_1-default
-UNKNOWN_TYPE | PaymentTypeSelection | OR | 1 | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | IsDebitCard | Yes | 1 | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | IsDebitCard | No | 0 | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | Body$SaveCC4Later | Save information for future purchases | on | Body$BillingIsShippingCheckboxB_1-default
+UNKNOWN_TYPE | PaymentTypeSelection | Pay with PayPal | 1 | Body$BillingIsShippingCheckboxB_1-default
 UNKNOWN_TYPE | Body$NewPassword | Create Password (optional) |  | Body$BillingIsShippingCheckboxB_1-default
 UNKNOWN_TYPE | Body$RepeatNewPassword | Repeat Password (optional) |  | Body$BillingIsShippingCheckboxB_1-default
 UNKNOWN_TYPE | Body$NewPasswordHint | Password Hint (optional) |  | Body$BillingIsShippingCheckboxB_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/04_checkout_lowes.com.out b/chrome/test/data/autofill/heuristics/output/04_checkout_lowes.com.out
index 9d90a8e7..5771ab1d 100644
--- a/chrome/test/data/autofill/heuristics/output/04_checkout_lowes.com.out
+++ b/chrome/test/data/autofill/heuristics/output/04_checkout_lowes.com.out
@@ -9,7 +9,7 @@
 ADDRESS_HOME_STATE | state | State: |  | address1_1-default
 ADDRESS_HOME_ZIP | zipCode | ZIP Code: |  | address1_1-default
 ADDRESS_HOME_CITY | taxGeoCode | Municipality: As an additional way to make sure you receive your order, we ask that you select the name of your municipality (city, town, borough, village, etc.) followed by the county, township, or parish in which you reside. |  | address1_1-default
-UNKNOWN_TYPE | billingAddress | Please enter the phone number and e-mail address associated with this billing address.E-mail Address: Contact Phone: | on | address1_1-default
+UNKNOWN_TYPE | billingAddress | This is also my billing address. | on | address1_1-default
 EMAIL_ADDRESS | email1 | E-mail Address: |  | address1_1-default
 PHONE_HOME_CITY_CODE | billphone1 | Contact Phone: |  | address1_1-default
 PHONE_HOME_NUMBER | billphone2 | Contact Phone: |  | address1_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/05_checkout_overstock.com.out b/chrome/test/data/autofill/heuristics/output/05_checkout_overstock.com.out
index 78e9692..f43cff3 100644
--- a/chrome/test/data/autofill/heuristics/output/05_checkout_overstock.com.out
+++ b/chrome/test/data/autofill/heuristics/output/05_checkout_overstock.com.out
@@ -7,8 +7,8 @@
 ADDRESS_HOME_ZIP | BillingZipCode | Zip | 95014 | BillingFirstName_1-default
 PHONE_HOME_WHOLE_NUMBER | BillingDaytimePhone | Day Phone | 4088737223 | BillingFirstName_1-default
 PHONE_HOME_WHOLE_NUMBER | BillingEveningPhone | Evening Phone |  | BillingFirstName_1-default
-UNKNOWN_TYPE | checkbox2 | *Required Field | on | BillingFirstName_1-default
-UNKNOWN_TYPE | diffShip | *Required Field | on | BillingFirstName_1-default
+UNKNOWN_TYPE | checkbox2 | This order is being sent as a gift | on | BillingFirstName_1-default
+UNKNOWN_TYPE | diffShip | My shipping address is the same as my billing address | on | BillingFirstName_1-default
 NAME_FIRST | ShippingFirstName | First Name |  | ShippingFirstName_1-default
 NAME_LAST | ShippingLastName | Last Name |  | ShippingFirstName_1-default
 ADDRESS_HOME_LINE1 | lineone | Address Line 1 | 7540 Donegal Dr | ShippingFirstName_1-default
@@ -24,9 +24,9 @@
 CREDIT_CARD_EXP_4_DIGIT_YEAR | exp_year | Expiration Date: |  | ShippingFirstName_1-cc
 UNKNOWN_TYPE | CC |  | PayPal | ShippingFirstName_1-default
 UNKNOWN_TYPE | CC |  | bml | ShippingFirstName_1-default
-UNKNOWN_TYPE | UsePromoCode | See Terms | on | ShippingFirstName_1-default
+UNKNOWN_TYPE | UsePromoCode | Use Promo Code | on | ShippingFirstName_1-default
 UNKNOWN_TYPE | PromoCode | See Terms |  | ShippingFirstName_1-default
-UNKNOWN_TYPE | UseGiftCards | See Terms | on | ShippingFirstName_1-default
+UNKNOWN_TYPE | UseGiftCards | Use Gift Card | on | ShippingFirstName_1-default
 UNKNOWN_TYPE | GiftCardNumber0 | Gift Card 1: |  | ShippingFirstName_1-default
 UNKNOWN_TYPE | PINNumber0 | PIN: |  | ShippingFirstName_1-default
 UNKNOWN_TYPE | GiftCardNumber1 | Gift Card 2: |  | ShippingFirstName_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/06_checkout_qvc.com.out b/chrome/test/data/autofill/heuristics/output/06_checkout_qvc.com.out
index 0ebdef2..cd58240 100644
--- a/chrome/test/data/autofill/heuristics/output/06_checkout_qvc.com.out
+++ b/chrome/test/data/autofill/heuristics/output/06_checkout_qvc.com.out
@@ -25,5 +25,5 @@
 ADDRESS_HOME_STATE | ShiptoState | State/Province: | AL | EmailAddress_1-default
 ADDRESS_HOME_ZIP | ShiptoZipCode | * Postal Code: |  | EmailAddress_1-default
 ADDRESS_HOME_COUNTRY | ShiptoCountry | * Country: | US | EmailAddress_1-default
-UNKNOWN_TYPE | ShiptoRadiobutton | Use this address for: | ThisOrderOnly | EmailAddress_1-default
-UNKNOWN_TYPE | ShiptoRadiobutton | This order only | PermanentShipto | EmailAddress_1-default
+UNKNOWN_TYPE | ShiptoRadiobutton | This order only | ThisOrderOnly | EmailAddress_1-default
+UNKNOWN_TYPE | ShiptoRadiobutton | (Permanent Ship-To)**All future orders | PermanentShipto | EmailAddress_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/06_checkout_sears.com.out b/chrome/test/data/autofill/heuristics/output/06_checkout_sears.com.out
index 8490089..4da6b7a 100644
--- a/chrome/test/data/autofill/heuristics/output/06_checkout_sears.com.out
+++ b/chrome/test/data/autofill/heuristics/output/06_checkout_sears.com.out
@@ -1,7 +1,7 @@
 EMAIL_ADDRESS | address_email | Email* | ne00_99@yahoo.com | address_email_1-default
 NAME_FIRST | shipping_firstName | First Name* |  | address_email_1-default
 NAME_LAST | shipping_lastName | Last Name* |  | address_email_1-default
-UNKNOWN_TYPE | shipping_country | First Name* | US | address_email_1-default
+UNKNOWN_TYPE | shipping_country | Street Address Line 1* | US | address_email_1-default
 ADDRESS_HOME_LINE1 | shipping_address1 | Street Address Line 1* |  | address_email_1-default
 ADDRESS_HOME_LINE2 | shipping_address2 | Street Address Line 2 |  | address_email_1-default
 ADDRESS_HOME_CITY | shipping_city | City* |  | address_email_1-default
@@ -13,7 +13,7 @@
 UNKNOWN_TYPE | billingAddressCheckBox | Same as Delivery/Shipping Address | on | address_email_1-default
 NAME_FIRST | firstName | First Name* |  | firstName_1-default
 NAME_LAST | lastName | Last Name* |  | firstName_1-default
-UNKNOWN_TYPE | country | First Name* | US | firstName_1-default
+UNKNOWN_TYPE | country | Street Address Line 1* | US | firstName_1-default
 ADDRESS_HOME_LINE1 | address1 | Street Address Line 1* |  | firstName_1-default
 ADDRESS_HOME_LINE2 | address2 | Street Address Line 2 |  | firstName_1-default
 ADDRESS_HOME_CITY | city | City* |  | firstName_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/06_checkout_urbanoutfitters.com.out b/chrome/test/data/autofill/heuristics/output/06_checkout_urbanoutfitters.com.out
index ac6ff1b8..50a3489 100644
--- a/chrome/test/data/autofill/heuristics/output/06_checkout_urbanoutfitters.com.out
+++ b/chrome/test/data/autofill/heuristics/output/06_checkout_urbanoutfitters.com.out
@@ -2,7 +2,7 @@
 NAME_FIRST | shippingFirstName |  | First Name | shipto_1-default
 NAME_LAST | shippingLastName |  | Last Name | shipto_1-default
 ADDRESS_HOME_LINE1 | shippingAddress |  | Street Address | shipto_1-default
-UNKNOWN_TYPE | shippingPobox |  | true | shipto_1-default
+UNKNOWN_TYPE | shippingPobox | This address is a P.O. Box | true | shipto_1-default
 ADDRESS_HOME_LINE2 | shippingAddress2 |  | Apt / Flr / Bldg (optional) | shipto_1-default
 ADDRESS_HOME_CITY | shippingCity |  | City | shipto_1-default
 ADDRESS_HOME_STATE | shippingStates |  |  | shipto_1-default
@@ -10,12 +10,12 @@
 ADDRESS_HOME_COUNTRY | shippingCountries |  |  | shipto_1-default
 PHONE_HOME_WHOLE_NUMBER | shippingPhone |  | Phone | shipto_1-default
 PHONE_HOME_WHOLE_NUMBER | altShippingPhone |  | Alternate Phone (optional) | shipto_1-default
-UNKNOWN_TYPE | billingIsShipping |  | true | shipto_1-default
-UNKNOWN_TYPE | defaultShipping |  | true | shipto_1-default
+UNKNOWN_TYPE | billingIsShipping | My billing address is the same as my shipping address | true | shipto_1-default
+UNKNOWN_TYPE | defaultShipping | Make this my default shipping address | true | shipto_1-default
 NAME_FIRST | billingFirstName |  | First Name | billingFirstName_1-default
 NAME_LAST | billingLastName |  | Last Name | billingFirstName_1-default
 ADDRESS_HOME_LINE1 | billingAddress |  | Street Address | billingFirstName_1-default
-UNKNOWN_TYPE | billingPobox |  | true | billingFirstName_1-default
+UNKNOWN_TYPE | billingPobox | This address is a P.O. Box | true | billingFirstName_1-default
 ADDRESS_HOME_LINE2 | billingAddress2 |  | Apt / Flr / Bldg (optional) | billingFirstName_1-default
 ADDRESS_HOME_CITY | billingCity |  | City | billingFirstName_1-default
 ADDRESS_HOME_STATE | billingStates |  |  | billingFirstName_1-default
@@ -23,11 +23,11 @@
 ADDRESS_HOME_COUNTRY | billingCountries |  |  | billingFirstName_1-default
 PHONE_HOME_WHOLE_NUMBER | billingPhone |  | Phone | billingFirstName_1-default
 PHONE_HOME_WHOLE_NUMBER | altBillingPhone |  | Alternate Phone (optional) | billingFirstName_1-default
-UNKNOWN_TYPE | defaultBilling |  | true | billingFirstName_1-default
+UNKNOWN_TYPE | defaultBilling | Make this my default billing address | true | billingFirstName_1-default
 UNKNOWN_TYPE | savedCreditCard |  |  | billingFirstName_1-default
 CREDIT_CARD_TYPE | payment_cardtype |  |  | billingFirstName_1-cc
 CREDIT_CARD_NUMBER | payment_acctnum |  | Card Number (no spaces or dashes) | billingFirstName_1-cc
 CREDIT_CARD_EXP_MONTH | expmonth |  |  | billingFirstName_1-cc
 CREDIT_CARD_EXP_4_DIGIT_YEAR | expyear |  |  | billingFirstName_1-cc
 CREDIT_CARD_VERIFICATION_CODE | payment_cidnew |  | CID / Security Code | billingFirstName_1-cc
-UNKNOWN_TYPE | makeDefaultCreditCard |  | true | billingFirstName_1-default
+UNKNOWN_TYPE | makeDefaultCreditCard | Make this my default credit card | true | billingFirstName_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/08_register_aol.com.out b/chrome/test/data/autofill/heuristics/output/08_register_aol.com.out
index 33f2600..94ac64a7 100644
--- a/chrome/test/data/autofill/heuristics/output/08_register_aol.com.out
+++ b/chrome/test/data/autofill/heuristics/output/08_register_aol.com.out
@@ -7,8 +7,8 @@
 UNKNOWN_TYPE | wlw-select_key:{actionForm.dobMonth} | Select Month |  | {actionForm.firstName}_1-default
 UNKNOWN_TYPE | {actionForm.dobDay} | Select Month | Day (dd) | {actionForm.firstName}_1-default
 UNKNOWN_TYPE | {actionForm.dobYear} | Select Month | Year (yyyy) | {actionForm.firstName}_1-default
-UNKNOWN_TYPE | wlw-radio_button_group_key:{actionForm.gender} | Gender | Female | {actionForm.firstName}_1-default
-UNKNOWN_TYPE | wlw-radio_button_group_key:{actionForm.gender} | Gender | Male | {actionForm.firstName}_1-default
+UNKNOWN_TYPE | wlw-radio_button_group_key:{actionForm.gender} | Female | Female | {actionForm.firstName}_1-default
+UNKNOWN_TYPE | wlw-radio_button_group_key:{actionForm.gender} | Male | Male | {actionForm.firstName}_1-default
 ADDRESS_HOME_ZIP | {actionForm.zipCode} | Zip Code |  | {actionForm.firstName}_1-default
 UNKNOWN_TYPE | wlw-select_key:{actionForm.acctSecurityQuestion} | Set a Security Question |  | {actionForm.firstName}_1-default
 UNKNOWN_TYPE | {actionForm.acctSecurityAnswer} | Set a Security Question | Your Answer | {actionForm.firstName}_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/09_register_ecomm.dell.com.out b/chrome/test/data/autofill/heuristics/output/09_register_ecomm.dell.com.out
index 3487e1c..ee2881f 100644
--- a/chrome/test/data/autofill/heuristics/output/09_register_ecomm.dell.com.out
+++ b/chrome/test/data/autofill/heuristics/output/09_register_ecomm.dell.com.out
@@ -7,7 +7,7 @@
 ADDRESS_HOME_STATE | address$ctl00$address$addressValidator$_EditView$region$ctl01 | CityState |  | name$ctl00$name$_EditView$first_1-default
 ADDRESS_HOME_ZIP | address$ctl00$address$addressValidator$_EditView$postal_code | Zip Code4-digit Ext. |  | name$ctl00$name$_EditView$first_1-default
 UNKNOWN_TYPE | address$ctl00$address$addressValidator$_EditView$postal_code2 | Zip Code4-digit Ext. |  | name$ctl00$name$_EditView$first_1-default
-UNKNOWN_TYPE | address$ctl00$address$addressValidator$OverrideAddress | Problems? | on | name$ctl00$name$_EditView$first_1-default
+UNKNOWN_TYPE | address$ctl00$address$addressValidator$OverrideAddress | Use the address I entered. Note that a non-standardized address may affect your tax accuracy and your delivery time. | on | name$ctl00$name$_EditView$first_1-default
 EMAIL_ADDRESS | email$ctl07 | Email Address (used to sign into your account) |  | name$ctl00$name$_EditView$first_1-default
 UNKNOWN_TYPE | CreateNewPassword$ctl07 | Create New Password |  | name$ctl00$name$_EditView$first_1-default
 UNKNOWN_TYPE | ConfirmPassword$ctl07 | Confirm New Password |  | name$ctl00$name$_EditView$first_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/09_register_epson.com.out b/chrome/test/data/autofill/heuristics/output/09_register_epson.com.out
index bb77f01d..ff04062 100644
--- a/chrome/test/data/autofill/heuristics/output/09_register_epson.com.out
+++ b/chrome/test/data/autofill/heuristics/output/09_register_epson.com.out
@@ -3,4 +3,4 @@
 EMAIL_ADDRESS | emLogin | * E-mail address |  | fname_1-default
 UNKNOWN_TYPE | pw | * Password |  | fname_1-default
 UNKNOWN_TYPE | verifypw | * Re-Confirm Password |  | fname_1-default
-UNKNOWN_TYPE | wantMsg |  | on | fname_1-default
+UNKNOWN_TYPE | wantMsg | I'd like to hear about new product information, special discounts and offers exclusive to Epson customers only. Please sign me up! | on | fname_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/10_register_gymboree.com.out b/chrome/test/data/autofill/heuristics/output/10_register_gymboree.com.out
index ddb0a01..f531577 100644
--- a/chrome/test/data/autofill/heuristics/output/10_register_gymboree.com.out
+++ b/chrome/test/data/autofill/heuristics/output/10_register_gymboree.com.out
@@ -12,6 +12,6 @@
 UNKNOWN_TYPE | LOYALTY_ACCOUNT<>password | Password*! |  | LOYALTY_ACCOUNT<>email_1-default
 UNKNOWN_TYPE | LOYALTY_ACCOUNT<>confirmPassword | Confirm Password* |  | LOYALTY_ACCOUNT<>email_1-default
 UNKNOWN_TYPE | LOYALTY_ACCOUNT<>ATR_USER_Password_Hint | Password Hint* |  | LOYALTY_ACCOUNT<>email_1-default
-UNKNOWN_TYPE | LOYALTY_ADDRESS<>ATR_indBillAsRewards | Password Hint*! | true | LOYALTY_ACCOUNT<>email_1-default
+UNKNOWN_TYPE | LOYALTY_ADDRESS<>ATR_indBillAsRewards | Save the address above as my default billing address. | true | LOYALTY_ACCOUNT<>email_1-default
 UNKNOWN_TYPE | LOYALTY_ACCOUNT<>sendEmail | Save the address above as my default billing address. I would like to receive promotions and special offers from Gymboree. | true | LOYALTY_ACCOUNT<>email_1-default
 UNKNOWN_TYPE | accept | I have read and accept the terms and conditions of Gymboree Rewards. (Rewards information and offers will be emailed to you.) | on | LOYALTY_ACCOUNT<>email_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/10_register_imdb.com.out b/chrome/test/data/autofill/heuristics/output/10_register_imdb.com.out
index 0bf5250..307cd7e 100644
--- a/chrome/test/data/autofill/heuristics/output/10_register_imdb.com.out
+++ b/chrome/test/data/autofill/heuristics/output/10_register_imdb.com.out
@@ -1,7 +1,7 @@
 EMAIL_ADDRESS | email1 | E-mail: |  | email1_1-default
 EMAIL_ADDRESS | email2 | Confirm E-mail: |  | email1_1-default
-UNKNOWN_TYPE | gender | Sex: | M | email1_1-default
-UNKNOWN_TYPE | gender | Male | F | email1_1-default
+UNKNOWN_TYPE | gender | Male | M | email1_1-default
+UNKNOWN_TYPE | gender | Female | F | email1_1-default
 UNKNOWN_TYPE | year | Year of Birth: |  | email1_1-default
 ADDRESS_HOME_ZIP | postal | ZIP/Postal Code: |  | email1_1-default
 ADDRESS_HOME_COUNTRY | country | Country: | US | email1_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/10_register_live.com.out b/chrome/test/data/autofill/heuristics/output/10_register_live.com.out
index 80de5a81..cb339ab 100644
--- a/chrome/test/data/autofill/heuristics/output/10_register_live.com.out
+++ b/chrome/test/data/autofill/heuristics/output/10_register_live.com.out
@@ -11,7 +11,7 @@
 UNKNOWN_TYPE | iSA | Secret answer: |  | iAltEmail_1-default
 NAME_FIRST | iFirstName | First name: |  | iAltEmail_1-default
 NAME_LAST | iLastName | Last name: |  | iAltEmail_1-default
-UNKNOWN_TYPE | profile_gender |  | m | iAltEmail_1-default
-UNKNOWN_TYPE | profile_gender |  | f | iAltEmail_1-default
+UNKNOWN_TYPE | profile_gender | Male | m | iAltEmail_1-default
+UNKNOWN_TYPE | profile_gender | Female | f | iAltEmail_1-default
 UNKNOWN_TYPE | iBirthYear | Birth year: | Example: 1990 | iAltEmail_1-default
 UNKNOWN_TYPE | iOptinEmail | Send me email with promotional offers and survey invitations from Windows Live, Bing, and MSN. (You can unsubscribe at any time.) | on | iAltEmail_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/11_register_myspace.com.out b/chrome/test/data/autofill/heuristics/output/11_register_myspace.com.out
index 69035c4..19ba2d2b 100644
--- a/chrome/test/data/autofill/heuristics/output/11_register_myspace.com.out
+++ b/chrome/test/data/autofill/heuristics/output/11_register_myspace.com.out
@@ -1,7 +1,7 @@
-UNKNOWN_TYPE | accountType | Account TypeWhat's this? | 2 | accountType_1-default
-UNKNOWN_TYPE | accountType | Personal | 7 | accountType_1-default
-UNKNOWN_TYPE | accountType | Musician | 15 | accountType_1-default
-UNKNOWN_TYPE | accountType | Comedian | 9 | accountType_1-default
+UNKNOWN_TYPE | accountType | Personal | 2 | accountType_1-default
+UNKNOWN_TYPE | accountType | Musician | 7 | accountType_1-default
+UNKNOWN_TYPE | accountType | Comedian | 15 | accountType_1-default
+UNKNOWN_TYPE | accountType | Filmmaker | 9 | accountType_1-default
 NAME_FIRST | tbxFirstName | First Name |  | accountType_1-default
 NAME_LAST | tbxLastName | Last Name |  | accountType_1-default
 UNKNOWN_TYPE | tbxMusicianName | Artist Name |  | accountType_1-default
@@ -13,5 +13,5 @@
 UNKNOWN_TYPE | ddlMonth | Birthday |  | accountType_1-default
 UNKNOWN_TYPE | ddlDay |  |  | accountType_1-default
 UNKNOWN_TYPE | ddlYear |  |  | accountType_1-default
-UNKNOWN_TYPE | rblGender | Gender | M | accountType_1-default
-UNKNOWN_TYPE | rblGender | Male | F | accountType_1-default
+UNKNOWN_TYPE | rblGender | Male | M | accountType_1-default
+UNKNOWN_TYPE | rblGender | Female | F | accountType_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/12_register_officedepot.com.out b/chrome/test/data/autofill/heuristics/output/12_register_officedepot.com.out
index 2d7a9c8..d5132a5 100644
--- a/chrome/test/data/autofill/heuristics/output/12_register_officedepot.com.out
+++ b/chrome/test/data/autofill/heuristics/output/12_register_officedepot.com.out
@@ -20,7 +20,7 @@
 CREDIT_CARD_EXP_MONTH | paymentFormInfo.creditCardExpMonth | Expiration Date: |   | addrsForm[0].firstName_1-cc
 CREDIT_CARD_EXP_4_DIGIT_YEAR | paymentFormInfo.creditCardExpYear | / | -1 | addrsForm[0].firstName_1-cc
 CREDIT_CARD_VERIFICATION_CODE | paymentFormInfo.creditCardCvv | CID |  | addrsForm[0].firstName_1-cc
-UNKNOWN_TYPE | sameAsBilling | Currently Office Depot is unable to process orders online for delivery to APO/FPO, PO Box, and export addresses. Please click here for additional ordering options * Indicates required field | on | addrsForm[0].firstName_1-default
+UNKNOWN_TYPE | sameAsBilling | Same as Billing | on | addrsForm[0].firstName_1-default
 NAME_FIRST | addrsForm[2].firstName | *First Name: |  | addrsForm[2].firstName_1-default
 NAME_MIDDLE_INITIAL | addrsForm[2].middleInitial | Middle Initial: |  | addrsForm[2].firstName_1-default
 NAME_LAST | addrsForm[2].lastName | *Last Name: |  | addrsForm[2].firstName_1-default
@@ -38,4 +38,4 @@
 UNKNOWN_TYPE | loginForm.loginName | *Login Name: |  | addrsForm[2].firstName_1-default
 UNKNOWN_TYPE | loginForm.password | *Password: |  | addrsForm[2].firstName_1-default
 UNKNOWN_TYPE | loginForm.passwordConfirm | *Password Confirm: |  | addrsForm[2].firstName_1-default
-UNKNOWN_TYPE | loginForm.autoLogin | *Password Confirm: | on | addrsForm[2].firstName_1-default
+UNKNOWN_TYPE | loginForm.autoLogin | Log me in automatically(Cookies must be enabled) | on | addrsForm[2].firstName_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/12_register_pyramidcollection.com.out b/chrome/test/data/autofill/heuristics/output/12_register_pyramidcollection.com.out
index 6acca3c..2602fed 100644
--- a/chrome/test/data/autofill/heuristics/output/12_register_pyramidcollection.com.out
+++ b/chrome/test/data/autofill/heuristics/output/12_register_pyramidcollection.com.out
@@ -21,4 +21,4 @@
 ADDRESS_HOME_ZIP | SZ1 | Zip Code * |  | SF1_1-default
 PHONE_HOME_WHOLE_NUMBER | SP2 | Day Phone * |  | SF1_1-default
 PHONE_HOME_WHOLE_NUMBER | SP3 | Evening Phone |  | SF1_1-default
-UNKNOWN_TYPE | sameAsBilling | Email Address * First Name * Last Name Address Line 1 First Name Last Name | on | SF1_1-default
+UNKNOWN_TYPE | sameAsBilling | My Shipping address is same as billing address. | on | SF1_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/12_register_rediff.com.out b/chrome/test/data/autofill/heuristics/output/12_register_rediff.com.out
index e398a19f..20c1ed7 100644
--- a/chrome/test/data/autofill/heuristics/output/12_register_rediff.com.out
+++ b/chrome/test/data/autofill/heuristics/output/12_register_rediff.com.out
@@ -10,8 +10,8 @@
 UNKNOWN_TYPE | DOB_Day | : |  | name_1-default
 UNKNOWN_TYPE | DOB_Month | : |  | name_1-default
 UNKNOWN_TYPE | DOB_Year | : |  | name_1-default
-UNKNOWN_TYPE | gender | : | m | name_1-default
-UNKNOWN_TYPE | gender | Male | f | name_1-default
+UNKNOWN_TYPE | gender | Male | m | name_1-default
+UNKNOWN_TYPE | gender | Female | f | name_1-default
 ADDRESS_HOME_COUNTRY | country | : | 99 | name_1-default
 ADDRESS_HOME_CITY | city | : |  | name_1-default
 UNKNOWN_TYPE | othercity | City : |  | name_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/12_register_rei.com.out b/chrome/test/data/autofill/heuristics/output/12_register_rei.com.out
index 11dbe7a..a2ae850 100644
--- a/chrome/test/data/autofill/heuristics/output/12_register_rei.com.out
+++ b/chrome/test/data/autofill/heuristics/output/12_register_rei.com.out
@@ -5,4 +5,4 @@
 UNKNOWN_TYPE | logonPasswordVerify | Re-type Password:* |  | firstName_1-default
 ADDRESS_HOME_ZIP | zipCode | ZIP (Postal) Code:* |  | firstName_1-default
 EMAIL_ADDRESS | email1 | E-mail Address:* |  | firstName_1-default
-UNKNOWN_TYPE | gearmail |  | y | firstName_1-default
+UNKNOWN_TYPE | gearmail | Yes, I'd like to be notified of news, offers and events at REI via this email address. | y | firstName_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/13_register_signup.clicksor.com.out b/chrome/test/data/autofill/heuristics/output/13_register_signup.clicksor.com.out
index 6d0914f..103d0de 100644
--- a/chrome/test/data/autofill/heuristics/output/13_register_signup.clicksor.com.out
+++ b/chrome/test/data/autofill/heuristics/output/13_register_signup.clicksor.com.out
@@ -12,5 +12,5 @@
 ADDRESS_HOME_STATE | province | State: |  | email1_1-default
 ADDRESS_HOME_ZIP | zipCode | Zip                           code: |  | email1_1-default
 ADDRESS_HOME_COUNTRY | country | Country: | US | email1_1-default
-UNKNOWN_TYPE | termcheck | Country: | ON | email1_1-default
+UNKNOWN_TYPE | termcheck | By checking this box I acknowledge                           that I have read and agree to the Clicksor™ | ON | email1_1-default
 UNKNOWN_TYPE | securityCode | Enter                           the security code shown below: |  | email1_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/13_register_signup.live.com.out b/chrome/test/data/autofill/heuristics/output/13_register_signup.live.com.out
index 80de5a81..cb339ab 100644
--- a/chrome/test/data/autofill/heuristics/output/13_register_signup.live.com.out
+++ b/chrome/test/data/autofill/heuristics/output/13_register_signup.live.com.out
@@ -11,7 +11,7 @@
 UNKNOWN_TYPE | iSA | Secret answer: |  | iAltEmail_1-default
 NAME_FIRST | iFirstName | First name: |  | iAltEmail_1-default
 NAME_LAST | iLastName | Last name: |  | iAltEmail_1-default
-UNKNOWN_TYPE | profile_gender |  | m | iAltEmail_1-default
-UNKNOWN_TYPE | profile_gender |  | f | iAltEmail_1-default
+UNKNOWN_TYPE | profile_gender | Male | m | iAltEmail_1-default
+UNKNOWN_TYPE | profile_gender | Female | f | iAltEmail_1-default
 UNKNOWN_TYPE | iBirthYear | Birth year: | Example: 1990 | iAltEmail_1-default
 UNKNOWN_TYPE | iOptinEmail | Send me email with promotional offers and survey invitations from Windows Live, Bing, and MSN. (You can unsubscribe at any time.) | on | iAltEmail_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/13_register_sourceforge.net.out b/chrome/test/data/autofill/heuristics/output/13_register_sourceforge.net.out
index 8d38048..4afcfce 100644
--- a/chrome/test/data/autofill/heuristics/output/13_register_sourceforge.net.out
+++ b/chrome/test/data/autofill/heuristics/output/13_register_sourceforge.net.out
@@ -11,8 +11,8 @@
 UNKNOWN_TYPE | X3XlRdtrBz0a6O_kXqynrr46rigU | Security Answer: |  | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
 UNKNOWN_TYPE | X0WBbd4KZLSgCIb8WlZZNJ3g3fVk | Job Title: |  | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
 UNKNOWN_TYPE | X229ZZcPc31emF7VTU0RPmITuTNc | Number of Employees: |  | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
-UNKNOWN_TYPE | X12VEYcbdixhIflk8_zHDFWB72qk |  | siteupdates | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
-UNKNOWN_TYPE | X12VEYcbdixhIflk8_zHDFWB72qk |  | research | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
-UNKNOWN_TYPE | X12VEYcbdixhIflk8_zHDFWB72qk |  | thirdparty | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
+UNKNOWN_TYPE | X12VEYcbdixhIflk8_zHDFWB72qk | Receive a monthly newsletter that includes site news, project updates and more. | siteupdates | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
+UNKNOWN_TYPE | X12VEYcbdixhIflk8_zHDFWB72qk | Receive a weekly newsletter that includes IT whitepapers, research, webcasts and more. | research | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
+UNKNOWN_TYPE | X12VEYcbdixhIflk8_zHDFWB72qk | Receive information from SourceForge.net partners. | thirdparty | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
 UNKNOWN_TYPE | X1GJbe8rKlh_p74K4nXnhkGtC-8Q | You seem to have CSS turned off. Please don't fill out this field. |  | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
 UNKNOWN_TYPE | X1GJbe8rKlx_p74K4nXnhkGtC-8Q | You seem to have CSS turned off. Please don't fill out this field. |  | X1mRVeMqejLnZpd1etxNGHllat2M_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/15_crbug_53075.out b/chrome/test/data/autofill/heuristics/output/15_crbug_53075.out
index f2ff022..8a6dfbe0 100644
--- a/chrome/test/data/autofill/heuristics/output/15_crbug_53075.out
+++ b/chrome/test/data/autofill/heuristics/output/15_crbug_53075.out
@@ -13,7 +13,7 @@
 ADDRESS_HOME_STATE | ecomms_county | County: |  | ecomms_company_name_1-default
 ADDRESS_HOME_ZIP | ecomms_postcode | Postcode: |  | ecomms_company_name_1-default
 ADDRESS_HOME_COUNTRY | ecomms_country | Country: | 224 | ecomms_company_name_1-default
-UNKNOWN_TYPE | delivery_address | Address Details Address1: Address2: Town / City: County: | 1 | ecomms_company_name_1-default
+UNKNOWN_TYPE | delivery_address | specify a different delivery address | 1 | ecomms_company_name_1-default
 UNKNOWN_TYPE | del_title | Title: |  | ecomms_company_name_1-default
 NAME_FIRST | del_first_name | First Name: |  | ecomms_company_name_1-default
 NAME_LAST | del_last_name | Last Name: |  | ecomms_company_name_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/15_crbug_64569.out b/chrome/test/data/autofill/heuristics/output/15_crbug_64569.out
index ef3dae3..f559658e 100644
--- a/chrome/test/data/autofill/heuristics/output/15_crbug_64569.out
+++ b/chrome/test/data/autofill/heuristics/output/15_crbug_64569.out
@@ -5,7 +5,7 @@
 CREDIT_CARD_EXP_MONTH | ccExpMonth | Expiration date | 1 | payment_group_1-cc
 CREDIT_CARD_EXP_4_DIGIT_YEAR | ccExpYear | Your name (as it appears on the card) Credit card number (no dashes or spaces) Expiration date | 2011 | payment_group_1-cc
 CREDIT_CARD_VERIFICATION_CODE | ccSecurity | Security code |  | payment_group_1-cc
-UNKNOWN_TYPE | sameinfo | First name Last name | on | payment_group_1-default
+UNKNOWN_TYPE | sameinfo | Same as shipping address? | on | payment_group_1-default
 NAME_FIRST | addrFirstName | First name |  | payment_group_1-default
 NAME_LAST | addrLastName | Last name |  | payment_group_1-default
 ADDRESS_HOME_LINE1 | addrStreet1 | (street address, PO box, company name) |  | payment_group_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/16_crbug_87517.out b/chrome/test/data/autofill/heuristics/output/16_crbug_87517.out
index 7dc2861..5a51ff8d 100644
--- a/chrome/test/data/autofill/heuristics/output/16_crbug_87517.out
+++ b/chrome/test/data/autofill/heuristics/output/16_crbug_87517.out
@@ -11,20 +11,20 @@
 PHONE_HOME_WHOLE_NUMBER | dphone | Telephone |  | f1_1-default
 EMAIL_ADDRESS | demail | Email * |  | f1_1-default
 UNKNOWN_TYPE | amt | $ |  | f1_1-default
-UNKNOWN_TYPE | tributeSelect | Gift amount in USD ($10 minimum) $ | on | f1_1-default
-UNKNOWN_TYPE | DonationType | Gift amount in USD ($10 minimum) $ | OneTime | f1_1-default
-UNKNOWN_TYPE | DonationType | This is a one time donation | Recurs | f1_1-default
+UNKNOWN_TYPE | tributeSelect | My donation is In Honor or In Memory of someone special | on | f1_1-default
+UNKNOWN_TYPE | DonationType | This is a one time donation | OneTime | f1_1-default
+UNKNOWN_TYPE | DonationType | I would like to make this a recurring donation deducted | Recurs | f1_1-default
 UNKNOWN_TYPE | ccrecurring | I would like to make this a recurring donation deducted | Monthly | f1_1-default
 UNKNOWN_TYPE | remLen | ( You may enter up to 500 characters. ) | 500 | f1_1-default
 UNKNOWN_TYPE | Comments | ( You may enter up to 500 characters. ) |  | f1_1-default
-UNKNOWN_TYPE | tribute |  | IHO | f1_1-default
-UNKNOWN_TYPE | tribute | In Honor Of | IMO | f1_1-default
+UNKNOWN_TYPE | tribute | In Honor Of | IHO | f1_1-default
+UNKNOWN_TYPE | tribute | In Memory Of | IMO | f1_1-default
 NAME_FULL | Tribute_Name | Name: |  | f1_1-default
 UNKNOWN_TYPE | Tribute_occasion | Occasion: |  | f1_1-default
-UNKNOWN_TYPE | Tribute_Disclosure | Occasion: | on | f1_1-default
-UNKNOWN_TYPE | Tribute_Notification | I wish to remain anonymous | on | f1_1-default
-UNKNOWN_TYPE | Tribute_IncludeAmount |  | 1 | f1_1-default
-UNKNOWN_TYPE | Tribute_IncludeAmount | Include the amount | 0 | f1_1-default
+UNKNOWN_TYPE | Tribute_Disclosure | I wish to remain anonymous | on | f1_1-default
+UNKNOWN_TYPE | Tribute_Notification | Please send a notification of my gift to the following address: | on | f1_1-default
+UNKNOWN_TYPE | Tribute_IncludeAmount | Include the amount | 1 | f1_1-default
+UNKNOWN_TYPE | Tribute_IncludeAmount | Do not include the amount | 0 | f1_1-default
 NAME_FULL | Tribute_NotifyName | Name: |  | f1_1-default
 EMAIL_ADDRESS | Tribute_Email | Email: |  | f1_1-default
 ADDRESS_HOME_LINE1 | Tribute_NotifyAddr | Street: |  | f1_1-default
@@ -36,7 +36,7 @@
 CREDIT_CARD_VERIFICATION_CODE | csc | CSC Number * What Is This? |  | f1_1-cc
 CREDIT_CARD_EXP_MONTH | ExpMon | Month | 1 | f1_1-cc
 CREDIT_CARD_EXP_4_DIGIT_YEAR | ExpYear | Year | 11 | f1_1-cc
-UNKNOWN_TYPE | SameAddress | Billing Address - | checkbox | f1_1-default
+UNKNOWN_TYPE | SameAddress | Same As Contact Address | checkbox | f1_1-default
 ADDRESS_HOME_LINE1 | CC_Addr | Address 1 * |  | CC_Addr_1-default
 ADDRESS_HOME_LINE2 | CC_Addr2 | Address 2 |  | CC_Addr_1-default
 ADDRESS_HOME_CITY | CC_City | City / State / Zip * |  | CC_Addr_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/16_crbug_98152.out b/chrome/test/data/autofill/heuristics/output/16_crbug_98152.out
index af1fd636..d3094ee 100644
--- a/chrome/test/data/autofill/heuristics/output/16_crbug_98152.out
+++ b/chrome/test/data/autofill/heuristics/output/16_crbug_98152.out
@@ -4,7 +4,7 @@
 CREDIT_CARD_EXP_4_DIGIT_YEAR | CCForm.expirationYear | Expiration date | 2011 | CCForm.cardType_1-cc
 CREDIT_CARD_NAME | CCForm.name | Name as it appears on card |  | CCForm.cardType_1-cc
 CREDIT_CARD_VERIFICATION_CODE | CCForm.cid |  |  | CCForm.cardType_1-cc
-UNKNOWN_TYPE | isBillingAddress | Make the most of your shopping experience with the Walmart Discover® or Walmart Credit Card®. Learn More or Apply Now. Debit cards (also called check cards, ATM cards or bank cards) are accepted if they have a Visa or MasterCard logo. | on | CCForm.cardType_1-default
+UNKNOWN_TYPE | isBillingAddress | Same as Shipping address | on | CCForm.cardType_1-default
 COMPANY_NAME | CCForm.companyName | Company Name |  | CCForm.cardType_1-default
 ADDRESS_HOME_LINE1 | addressForm.street1 | Address Line 1 |  | CCForm.cardType_1-default
 ADDRESS_HOME_LINE2 | addressForm.street2 | Address Line 2 |  | CCForm.cardType_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/16_crbug_98269.out b/chrome/test/data/autofill/heuristics/output/16_crbug_98269.out
index c6d3ba9..af6cb1c 100644
--- a/chrome/test/data/autofill/heuristics/output/16_crbug_98269.out
+++ b/chrome/test/data/autofill/heuristics/output/16_crbug_98269.out
@@ -7,13 +7,13 @@
 UNKNOWN_TYPE | selBirthMonth | * Date of Birth: | Month | PaymentMethod_1-default
 UNKNOWN_TYPE | selBirthDate | * Date of Birth: | Date | PaymentMethod_1-default
 UNKNOWN_TYPE | selBirthYear | * Date of Birth: | Year | PaymentMethod_1-default
-UNKNOWN_TYPE | chkTAC | * | on | PaymentMethod_1-default
+UNKNOWN_TYPE | chkTAC | I agree to have the | on | PaymentMethod_1-default
 UNKNOWN_TYPE | PaymentMethod |  | CK | PaymentMethod_1-default
 UNKNOWN_TYPE | PaymentMethod |  | AddNew | PaymentMethod_1-default
 CREDIT_CARD_TYPE | cardType | Type: | VI | PaymentMethod_1-cc
 CREDIT_CARD_NUMBER | CreditCardNumber | Number: |  | PaymentMethod_1-cc
 CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR | CreditCardExpYYMM | Expiration: | 092011 | PaymentMethod_1-cc
 CREDIT_CARD_VERIFICATION_CODE | CVV | Security Code: |  | PaymentMethod_1-cc
-UNKNOWN_TYPE | useGiftCard | QVC Gift Cards | on | PaymentMethod_1-default
+UNKNOWN_TYPE | useGiftCard | Use a Gift Card. | on | PaymentMethod_1-default
 UNKNOWN_TYPE | GiftCardNum | Card Number: |  | PaymentMethod_1-default
 UNKNOWN_TYPE | GiftCardPIN | Security ID Number: |  | PaymentMethod_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/20_llbean.out b/chrome/test/data/autofill/heuristics/output/20_llbean.out
index d7c283a6..646408a 100644
--- a/chrome/test/data/autofill/heuristics/output/20_llbean.out
+++ b/chrome/test/data/autofill/heuristics/output/20_llbean.out
@@ -2,16 +2,16 @@
 NAME_FIRST | firstName | First Name |  | personTitle_1-default
 NAME_MIDDLE | middleName | Middle Name(optional) |  | personTitle_1-default
 NAME_LAST | lastName | Last Name |  | personTitle_1-default
-UNKNOWN_TYPE | gender | Gender (optional) | M | personTitle_1-default
-UNKNOWN_TYPE | gender | Gender (optional) | F | personTitle_1-default
+UNKNOWN_TYPE | gender | Male | M | personTitle_1-default
+UNKNOWN_TYPE | gender | Female | F | personTitle_1-default
 ADDRESS_HOME_COUNTRY | country | Country | USA | personTitle_1-default
 ADDRESS_HOME_ZIP | JPNPostal | Postal Code |  | personTitle_1-default
 UNKNOWN_TYPE | JPNPrefecture | Prefecture |  | personTitle_1-default
 ADDRESS_HOME_CITY | JPNCity | City |  | personTitle_1-default
 COMPANY_NAME | organizationName | Business, Attention, or In Care of Name (optional) |  | personTitle_1-default
-UNKNOWN_TYPE | orgNameInd | Business, Attention, or In Care of Name (optional) | BUS | personTitle_1-default
-UNKNOWN_TYPE | orgNameInd | Business, Attention, or In Care of Name (optional) | C/O | personTitle_1-default
-UNKNOWN_TYPE | orgNameInd | Business, Attention, or In Care of Name (optional) | ATTN | personTitle_1-default
+UNKNOWN_TYPE | orgNameInd | Business | BUS | personTitle_1-default
+UNKNOWN_TYPE | orgNameInd | In care of | C/O | personTitle_1-default
+UNKNOWN_TYPE | orgNameInd | Attention | ATTN | personTitle_1-default
 ADDRESS_HOME_LINE1 | address1 | Address |  | personTitle_1-default
 ADDRESS_HOME_LINE2 | address2 | Address Line 2 (optional) |  | personTitle_1-default
 ADDRESS_HOME_LINE3 | address3 | Address Line 3 (optional) |  | personTitle_1-default
@@ -27,12 +27,12 @@
 PHONE_HOME_WHOLE_NUMBER | phone1 | Daytime Phone Number (optional) |  | personTitle_1-default
 PHONE_HOME_WHOLE_NUMBER | intlPhone1Prefix | International Country Code |  | personTitle_1-default
 PHONE_HOME_WHOLE_NUMBER | intlPhone1 | Daytime Phone Number |  | personTitle_1-default
-UNKNOWN_TYPE | phone1_Loc | International Country Code Daytime Phone Number | H | personTitle_1-default
-UNKNOWN_TYPE | phone1_Loc | International Country Code Daytime Phone Number | B | personTitle_1-default
-UNKNOWN_TYPE | phone1_Loc | International Country Code Daytime Phone Number | M | personTitle_1-default
-UNKNOWN_TYPE | ckoutShippingCheck | Daytime Phone Number (optional) International Country Code Daytime Phone Number | ckoutShippingCheck | personTitle_1-default
-UNKNOWN_TYPE | shipModeId | Shipping | 10 | personTitle_1-default
-UNKNOWN_TYPE | shipModeId | Shipping | 11 | personTitle_1-default
-UNKNOWN_TYPE | shipLiability | Shipping | on | personTitle_1-default
-UNKNOWN_TYPE | shipAddGiftMsg | Shipping | addGiftMsg | personTitle_1-default
+UNKNOWN_TYPE | phone1_Loc | Home | H | personTitle_1-default
+UNKNOWN_TYPE | phone1_Loc | Work | B | personTitle_1-default
+UNKNOWN_TYPE | phone1_Loc | Mobile | M | personTitle_1-default
+UNKNOWN_TYPE | ckoutShippingCheck | Include phone number | ckoutShippingCheck | personTitle_1-default
+UNKNOWN_TYPE | shipModeId | Fast | 10 | personTitle_1-default
+UNKNOWN_TYPE | shipModeId | Slow | 11 | personTitle_1-default
+UNKNOWN_TYPE | shipLiability | Liability | on | personTitle_1-default
+UNKNOWN_TYPE | shipAddGiftMsg | Message | addGiftMsg | personTitle_1-default
 UNKNOWN_TYPE | giftMsg | Message |  | personTitle_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/21_checkout_peapod.com.out b/chrome/test/data/autofill/heuristics/output/21_checkout_peapod.com.out
index 4f6b19db..8ceafcb 100644
--- a/chrome/test/data/autofill/heuristics/output/21_checkout_peapod.com.out
+++ b/chrome/test/data/autofill/heuristics/output/21_checkout_peapod.com.out
@@ -1,4 +1,4 @@
-UNKNOWN_TYPE |  | Billing Information | on | _1-default
+UNKNOWN_TYPE |  | My billing address and delivery address are the same. | on | _1-default
 UNKNOWN_TYPE | billTitle | Title: | Ms. | _1-default
 NAME_FIRST | billFirstName |  | Shorty | _1-default
 NAME_LAST | billLastName | Last Name: | Nge | _1-default
diff --git a/chrome/test/data/autofill/heuristics/output/23_checkout_m_nordstroms.com.out b/chrome/test/data/autofill/heuristics/output/23_checkout_m_nordstroms.com.out
index e4a0043..381ff9a 100644
--- a/chrome/test/data/autofill/heuristics/output/23_checkout_m_nordstroms.com.out
+++ b/chrome/test/data/autofill/heuristics/output/23_checkout_m_nordstroms.com.out
@@ -8,9 +8,9 @@
 ADDRESS_HOME_STATE |  | State |  | _1-default
 ADDRESS_HOME_ZIP |  | ZIP Code |  | _1-default
 PHONE_HOME_WHOLE_NUMBER |  | Phone Information |  | _1-default
-UNKNOWN_TYPE |  |  | on | _1-default
-UNKNOWN_TYPE | multiple-address | Shipping to more than one address? | false | _1-default
-UNKNOWN_TYPE | multiple-address | Shipping to more than one address? | true | _1-default
+UNKNOWN_TYPE |  | Use this as my billing address. | on | _1-default
+UNKNOWN_TYPE | multiple-address | No | false | _1-default
+UNKNOWN_TYPE | multiple-address | Yes | true | _1-default
 UNKNOWN_TYPE |  | Note Number |  | _1-default
 UNKNOWN_TYPE |  | Access Code |  | _1-default
 UNKNOWN_TYPE |  | Gift Card Number |  | _1-default
@@ -18,14 +18,14 @@
 UNKNOWN_TYPE |  | Please do not fill out the next field, it is a security measure to insure that this page is being visited by a human. |  | _1-default
 UNKNOWN_TYPE |  | Enter a Promotion Code |  | _1-default
 UNKNOWN_TYPE |  | Employee Number |  | _1-default
-UNKNOWN_TYPE | discount | Discount |  | _1-default
+UNKNOWN_TYPE | discount | % |  | _1-default
 UNKNOWN_TYPE | discount | % |  | _1-default
 UNKNOWN_TYPE |  | CREDIT CARD |  | _1-default
 UNKNOWN_TYPE |  | Card Number Information |  | _1-default
 UNKNOWN_TYPE |  |  |  | _1-default
 UNKNOWN_TYPE |  |  |  | _1-default
 UNKNOWN_TYPE | credit-ccv | Security Code Information |  | _1-default
-UNKNOWN_TYPE |  | CREDIT CARD | on | _1-default
+UNKNOWN_TYPE |  | Yes, I would like to save my credit card information. | on | _1-default
 UNKNOWN_TYPE |  | BILL TO |  | _1-default
 NAME_FIRST |  | First Name |  | _1-default
 NAME_MIDDLE_INITIAL |  | M.I. |  | _1-default
@@ -38,4 +38,4 @@
 ADDRESS_HOME_COUNTRY |  | Country | 0 | _1-default
 EMAIL_ADDRESS |  | E-mail Information Information |  | _1-default
 PHONE_HOME_WHOLE_NUMBER |  | Phone Information Information |  | _1-default
-UNKNOWN_TYPE |  | We'll send any order correspondence e-mails to the address below, and give you a call if anything comes up. E-mail | on | _1-default
+UNKNOWN_TYPE |  | Send me e-mail updates about the latest trends, products and promotions online and in store. Yes! | on | _1-default
diff --git a/chrome/test/data/autofill/heuristics/output/24_checkout_virgin_america.com.out b/chrome/test/data/autofill/heuristics/output/24_checkout_virgin_america.com.out
index a7d97c9..15eb1d99 100644
--- a/chrome/test/data/autofill/heuristics/output/24_checkout_virgin_america.com.out
+++ b/chrome/test/data/autofill/heuristics/output/24_checkout_virgin_america.com.out
@@ -4,7 +4,7 @@
 CREDIT_CARD_EXP_4_DIGIT_YEAR | expireYear | Expiration Date |  | creditCard_1-cc
 CREDIT_CARD_VERIFICATION_CODE | securityNumber | CVV Number 3 or 4 digit number |  | creditCard_1-cc
 UNKNOWN_TYPE | nickname | Card's nickname e.g. My Visa, Corporate card, etc |  | creditCard_1-default
-UNKNOWN_TYPE | useAddress |  | use-stored-address | creditCard_1-default
+UNKNOWN_TYPE | useAddress | Use stored address | use-stored-address | creditCard_1-default
 UNKNOWN_TYPE | stored-address |  | ? | creditCard_1-default
-UNKNOWN_TYPE | useAddress |  | add-new-address | creditCard_1-default
-UNKNOWN_TYPE | shouldSave | Card's nickname e.g. My Visa, Corporate card, etc | on | creditCard_1-default
+UNKNOWN_TYPE | useAddress | Add new address | add-new-address | creditCard_1-default
+UNKNOWN_TYPE | shouldSave | Save credit card info | on | creditCard_1-default
diff --git a/chrome/test/data/autofill/heuristics/output/25_checkout_m_llbean.com.out b/chrome/test/data/autofill/heuristics/output/25_checkout_m_llbean.com.out
index bb609dd..3f19903 100644
--- a/chrome/test/data/autofill/heuristics/output/25_checkout_m_llbean.com.out
+++ b/chrome/test/data/autofill/heuristics/output/25_checkout_m_llbean.com.out
@@ -2,8 +2,8 @@
 NAME_FIRST | _1_firstName | First Name |  | _1_personTitle_1-default
 NAME_MIDDLE | _1_middleName | Middle Name(optional) |  | _1_personTitle_1-default
 NAME_LAST | _1_lastName | Last Name |  | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_gender | Gender (optional) | M | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_gender | Gender (optional) | F | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_gender | Male | M | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_gender | Female | F | _1_personTitle_1-default
 ADDRESS_HOME_COUNTRY | _1_country | Country USA & Territories | USA | _1_personTitle_1-default
 ADDRESS_HOME_ZIP | _1_JPNPostal | Postal Code |  | _1_personTitle_1-default
 UNKNOWN_TYPE | _1_JPNPrefecture | Prefecture |  | _1_personTitle_1-default
@@ -20,14 +20,14 @@
 ADDRESS_HOME_CITY | _1_INTLCity | City |  | _1_personTitle_1-default
 ADDRESS_HOME_STATE | _1_INTLCounty | County |  | _1_personTitle_1-default
 ADDRESS_HOME_ZIP | _1_INTLPostal | Postal Code |  | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_addressSelect | Address Type | homeAddress | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_addressSelect | Address Type | bizAddress | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_addressSelect | Home | homeAddress | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_addressSelect | Business | bizAddress | _1_personTitle_1-default
 COMPANY_NAME | _1_otherAddress | Company Name (optional) |  | _1_personTitle_1-default
 PHONE_HOME_WHOLE_NUMBER | _1_phone1 | Daytime Phone Number |  | _1_personTitle_1-default
 PHONE_HOME_WHOLE_NUMBER | _1_intlPhone1Prefix | Daytime Phone Number |  | _1_personTitle_1-default
 PHONE_HOME_WHOLE_NUMBER | _1_intlPhone1 | Daytime Phone Number |  | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_phone1_Loc | Daytime Phone Number | H | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_phone1_Loc | Daytime Phone Number | B | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_phone1_Loc | Daytime Phone Number | M | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_ckoutShippingCheck | Daytime Phone Number Daytime Phone Number | ckoutShippingCheck | _1_personTitle_1-default
-UNKNOWN_TYPE | _1_shipLiability | Note: Express Shipping is not recommended for Canadian PO Boxes | on | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_phone1_Loc | Home | H | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_phone1_Loc | Work | B | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_phone1_Loc | Mobile | M | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_ckoutShippingCheck | Include my phone number on shipping forms | ckoutShippingCheck | _1_personTitle_1-default
+UNKNOWN_TYPE | _1_shipLiability | I accept liability for shipping these items uninsured | on | _1_personTitle_1-default
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc
index 6081ccb..66e8c927 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -230,24 +230,18 @@
   return node_text;
 }
 
-// Helper for |InferLabelForElement()| that infers a label, if possible, from
-// a previous sibling of |element|,
-// e.g. Some Text <input ...>
-// or   Some <span>Text</span> <input ...>
-// or   <p>Some Text</p><input ...>
-// or   <label>Some Text</label> <input ...>
-// or   Some Text <img><input ...>
-// or   <b>Some Text</b><br/> <input ...>.
-base::string16 InferLabelFromPrevious(const WebFormControlElement& element) {
+// Shared function for InferLabelFromPrevious() and InferLabelFromNext().
+base::string16 InferLabelFromSibling(const WebFormControlElement& element,
+                                     bool forward) {
   base::string16 inferred_label;
-  WebNode previous = element;
+  WebNode sibling = element;
   while (true) {
-    previous = previous.previousSibling();
-    if (previous.isNull())
+    sibling = forward ? sibling.nextSibling() : sibling.previousSibling();
+    if (sibling.isNull())
       break;
 
     // Skip over comments.
-    WebNode::NodeType node_type = previous.nodeType();
+    WebNode::NodeType node_type = sibling.nodeType();
     if (node_type == WebNode::CommentNode)
       continue;
 
@@ -264,12 +258,12 @@
     CR_DEFINE_STATIC_LOCAL(WebString, kStrong, ("strong"));
     CR_DEFINE_STATIC_LOCAL(WebString, kSpan, ("span"));
     CR_DEFINE_STATIC_LOCAL(WebString, kFont, ("font"));
-    if (previous.isTextNode() ||
-        HasTagName(previous, kBold) || HasTagName(previous, kStrong) ||
-        HasTagName(previous, kSpan) || HasTagName(previous, kFont)) {
-      base::string16 value = FindChildText(previous);
+    if (sibling.isTextNode() ||
+        HasTagName(sibling, kBold) || HasTagName(sibling, kStrong) ||
+        HasTagName(sibling, kSpan) || HasTagName(sibling, kFont)) {
+      base::string16 value = FindChildText(sibling);
       // A text node's value will be empty if it is for a line break.
-      bool add_space = previous.isTextNode() && value.empty();
+      bool add_space = sibling.isTextNode() && value.empty();
       inferred_label =
           CombineAndCollapseWhitespace(value, inferred_label, add_space);
       continue;
@@ -286,14 +280,14 @@
     // label text, so skip over them.
     CR_DEFINE_STATIC_LOCAL(WebString, kImage, ("img"));
     CR_DEFINE_STATIC_LOCAL(WebString, kBreak, ("br"));
-    if (HasTagName(previous, kImage) || HasTagName(previous, kBreak))
+    if (HasTagName(sibling, kImage) || HasTagName(sibling, kBreak))
       continue;
 
     // We only expect <p> and <label> tags to contain the full label text.
     CR_DEFINE_STATIC_LOCAL(WebString, kPage, ("p"));
     CR_DEFINE_STATIC_LOCAL(WebString, kLabel, ("label"));
-    if (HasTagName(previous, kPage) || HasTagName(previous, kLabel))
-      inferred_label = FindChildText(previous);
+    if (HasTagName(sibling, kPage) || HasTagName(sibling, kLabel))
+      inferred_label = FindChildText(sibling);
 
     break;
   }
@@ -303,6 +297,24 @@
 }
 
 // Helper for |InferLabelForElement()| that infers a label, if possible, from
+// a previous sibling of |element|,
+// e.g. Some Text <input ...>
+// or   Some <span>Text</span> <input ...>
+// or   <p>Some Text</p><input ...>
+// or   <label>Some Text</label> <input ...>
+// or   Some Text <img><input ...>
+// or   <b>Some Text</b><br/> <input ...>.
+base::string16 InferLabelFromPrevious(const WebFormControlElement& element) {
+  return InferLabelFromSibling(element, false /* forward? */);
+}
+
+// Same as InferLabelFromPrevious(), but in the other direction.
+// Useful for cases like: <span><input type="checkbox">Label For Checkbox</span>
+base::string16 InferLabelFromNext(const WebFormControlElement& element) {
+  return InferLabelFromSibling(element, true /* forward? */);
+}
+
+// Helper for |InferLabelForElement()| that infers a label, if possible, from
 // placeholder text,
 base::string16 InferLabelFromPlaceholder(const WebFormControlElement& element) {
   CR_DEFINE_STATIC_LOCAL(WebString, kPlaceholder, ("placeholder"));
@@ -475,7 +487,14 @@
 // Infers corresponding label for |element| from surrounding context in the DOM,
 // e.g. the contents of the preceding <p> tag or text element.
 base::string16 InferLabelForElement(const WebFormControlElement& element) {
-  base::string16 inferred_label = InferLabelFromPrevious(element);
+  base::string16 inferred_label;
+  if (IsCheckableElement(toWebInputElement(&element))) {
+    inferred_label = InferLabelFromNext(element);
+    if (!inferred_label.empty())
+      return inferred_label;
+  }
+
+  inferred_label = InferLabelFromPrevious(element);
   if (!inferred_label.empty())
     return inferred_label;