New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 616174 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Truncate expiration year based on prediction type and max length on input fields.

Project Member Reported by se...@chromium.org, May 31 2016

Issue description

For example, a field predicted as CREDIT_CARD_EXP_2_DIGIT_YEAR currently fills the whole year. 

Also a field predicted as CREDIT_CARD_EXP_4_DIGIT_YEAR but with a max length of 2 currently ends up filling "20XX" which is truncated by the site as "20" instead of "XX".



 
Project Member

Comment 1 by bugdroid1@chromium.org, May 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/103c242eb62e46367cc80dfbfa71ebbf4f9cbb10

commit 103c242eb62e46367cc80dfbfa71ebbf4f9cbb10
Author: sebsg <sebsg@chromium.org>
Date: Tue May 31 22:36:50 2016

Use the prediction type and max length attribute of the field to determine the number (if any) of character to truncate from the start of the expiration year when filling an input field.

BUG= 616174 
TEST=AutofillFieldTest

Review-Url: https://codereview.chromium.org/2025063002
Cr-Commit-Position: refs/heads/master@{#396956}

[modify] https://crrev.com/103c242eb62e46367cc80dfbfa71ebbf4f9cbb10/components/autofill/core/browser/autofill_field.cc
[modify] https://crrev.com/103c242eb62e46367cc80dfbfa71ebbf4f9cbb10/components/autofill/core/browser/autofill_field_unittest.cc

Comment 2 by se...@chromium.org, Jun 2 2016

Status: Fixed (was: Started)

Comment 3 by ma...@chromium.org, Jun 2 2016

Labels: Merge-Request-52 M-52

Comment 4 by tin...@google.com, Jun 2 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
Please provide the testcase for verifying the issue.
Team can verify in canary and if all looks good please merge to M52 branch.

Comment 6 by se...@chromium.org, Jun 2 2016

I made a form to manually test this. You can access it at:
http://www.googledrive.com/host/0B7D_Lm7_KuBIQWNOOVN0ZHdicmM

Thanks
Cc: ranjitkan@chromium.org
Rechecked this on Chrome Canary version 53.0.2757.0 on Windows 7, MAC 10.11.5, Ubuntu 14.04 using the above test URL, looks like fix is not yet in as it  takes the first 2 digits in year rather than the last 2. Attached screenshot for the same.

@sebsg: Request you to please take a look into it.

Thanks.!
Screen Shot 2016-06-03 at 2.26.16 PM.png
50.6 KB View Download
Status: Assigned (was: Fixed)
Assigning to sebsg@ as per #7.
Project Member

Comment 9 by sheriffbot@chromium.org, Jun 6 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0f28ddfb76aff4a18095e19421f6bc1eb3975f0d

commit 0f28ddfb76aff4a18095e19421f6bc1eb3975f0d
Author: sebsg <sebsg@chromium.org>
Date: Mon Jun 06 18:33:02 2016

The previous CL was built around a test case I had made myself (there was no real life example). I found one and realized the type should be "text" and not "input".

Related CL: https://codereview.chromium.org/2025063002/

BUG= 616174 
TEST=AutofillFieldTest

Review-Url: https://codereview.chromium.org/2041863003
Cr-Commit-Position: refs/heads/master@{#398073}

[modify] https://crrev.com/0f28ddfb76aff4a18095e19421f6bc1eb3975f0d/components/autofill/core/browser/autofill_field.cc
[modify] https://crrev.com/0f28ddfb76aff4a18095e19421f6bc1eb3975f0d/components/autofill/core/browser/autofill_field_unittest.cc

Can we use the same testcase mentioned in #6 for verifying the above fix?
Yes, and it should work this time!
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 6 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2f7a4aea3d09aaae5e1c0ed9efbbca88efe3ea54

commit 2f7a4aea3d09aaae5e1c0ed9efbbca88efe3ea54
Author: sebsg <sebsg@chromium.org>
Date: Mon Jun 06 19:58:13 2016

[Autofill] Truncate expiration year based on prediction and max length.

Use the prediction type and max length attribute of the field to determine the number (if any) of character to truncate from the start of the expiration year when filling an input field.

BUG= 616174 
TEST=AutofillFieldTest

Review-Url: https://codereview.chromium.org/2025063002
Cr-Commit-Position: refs/heads/master@{#396956}
(cherry picked from commit 103c242eb62e46367cc80dfbfa71ebbf4f9cbb10)

NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2029403003
Cr-Commit-Position: refs/branch-heads/2743@{#246}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/2f7a4aea3d09aaae5e1c0ed9efbbca88efe3ea54/components/autofill/core/browser/autofill_field.cc
[modify] https://crrev.com/2f7a4aea3d09aaae5e1c0ed9efbbca88efe3ea54/components/autofill/core/browser/autofill_field_unittest.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Jun 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d07296746c15840c0281b4e7e51afd83dec15b4

commit 9d07296746c15840c0281b4e7e51afd83dec15b4
Author: sebsg <sebsg@chromium.org>
Date: Mon Jun 06 20:51:01 2016

The previous CL was built around a test case I had made myself (there was no real life example). I found one and realized the type should be "text" and not "input".

Related CL: https://codereview.chromium.org/2025063002/

BUG= 616174 
TEST=AutofillFieldTest

Review-Url: https://codereview.chromium.org/2041863003
Cr-Commit-Position: refs/heads/master@{#398073}
(cherry picked from commit 0f28ddfb76aff4a18095e19421f6bc1eb3975f0d)

NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2044653002
Cr-Commit-Position: refs/branch-heads/2743@{#250}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/9d07296746c15840c0281b4e7e51afd83dec15b4/components/autofill/core/browser/autofill_field.cc
[modify] https://crrev.com/9d07296746c15840c0281b4e7e51afd83dec15b4/components/autofill/core/browser/autofill_field_unittest.cc

Cc: rnimmagadda@chromium.org
Labels: TE-Verified-M53 TE-Verified-53.0.2761.2
Verified the fix on Windows 7, MAC (10.11.5) & Ubuntu Trusty (14.04) for Google Chrome Dev Version - 53.0.2761.0

Screen-shot is attached.

TE-Verified labels are added.
Screen Shot 2016-06-07 at 3.35.55 PM.png
25.1 KB View Download
Status: Fixed (was: Assigned)
Labels: TE-Verified-52.0.2743.33 TE-Verified-M52
Verified the fix on Windows 7, MAC (10.11.5) & Ubuntu Trusty (14.04) for Google Chrome Beta Version - 52.0.2743.33

Screen-shot is attached.

TE-Verified labels are added.
Screen Shot 2016-06-08 at 11.27.08 AM.png
81.6 KB View Download

Sign in to add a comment