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

Issue 2673753005: [Payments] Basic validation in the credit card editor. (Closed)

Created:
3 years, 10 months ago by Mathieu
Modified:
3 years, 10 months ago
CC:
browser-components-watch_chromium.org, chromium-reviews, estade+watch_chromium.org, gogerald+paymentswatch_chromium.org, mathp+autofillwatch_chromium.org, rogerm+autofillwatch_chromium.org, rouslan+payments_chromium.org, rouslan+autofill_chromium.org, sebsg+autofillwatch_chromium.org, sebsg+paymentswatch_chromium.org, tfarina, vabr+watchlistautofill_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Payments] Basic validation in the credit card editor. Introducting the ValidatingTextfield class, which will be used to validate only on first blur, and on every subsequent contents change. Created validation methods in autofill code, which will return the proper error messages (to be displayed in a follow-up CL). BUG=687601 TEST=ValidatingTextfieldTest unit_tests, PaymentRequest* interactive_ui_tests, AutofillValidation components_unittests Review-Url: https://codereview.chromium.org/2673753005 Cr-Commit-Position: refs/heads/master@{#449409} Committed: https://chromium.googlesource.com/chromium/src/+/d4cfd8f80766dbadbbe6f04202304af5b4863e3d

Patch Set 1 : Initial #

Patch Set 2 : more tests #

Total comments: 20

Patch Set 3 : rouslan's comments #

Total comments: 22

Patch Set 4 : anthony's comments #

Patch Set 5 : update strings #

Patch Set 6 : rebase #

Patch Set 7 : fix test #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+821 lines, -173 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/credit_card_editor_view_controller.h View 1 2 3 2 chunks +18 lines, -1 line 0 comments Download
M chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc View 1 2 3 2 chunks +48 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/payments/editor_view_controller.h View 1 2 3 4 chunks +19 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/payments/editor_view_controller.cc View 1 2 3 6 chunks +28 lines, -26 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc View 1 2 chunks +50 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.cc View 1 2 chunks +20 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/payments/validating_textfield.h View 1 2 3 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/payments/validating_textfield.cc View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/payments/validating_textfield_unittest.cc View 1 2 3 4 5 6 1 chunk +68 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/core/browser/credit_card.h View 2 chunks +14 lines, -14 lines 0 comments Download
M components/autofill/core/browser/credit_card.cc View 2 chunks +44 lines, -44 lines 0 comments Download
M components/autofill/core/browser/validation.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M components/autofill/core/browser/validation.cc View 1 2 3 4 5 2 chunks +111 lines, -0 lines 0 comments Download
M components/autofill/core/browser/validation_unittest.cc View 1 2 3 4 5 2 chunks +205 lines, -1 line 0 comments Download
M components/autofill_strings.grdp View 1 2 3 4 5 1 chunk +0 lines, -20 lines 0 comments Download
M components/payments/payment_request.h View 3 chunks +6 lines, -1 line 0 comments Download
M components/payments/payment_request.cc View 3 chunks +2 lines, -9 lines 0 comments Download
M components/payments/payment_request_delegate.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/payments_strings.grdp View 1 2 3 4 5 chunks +73 lines, -40 lines 0 comments Download

Messages

Total messages: 33 (22 generated)
Mathieu
Hi Rouslan and Anthony, PTAL
3 years, 10 months ago (2017-02-06 22:06:13 UTC) #10
please use gerrit instead
https://codereview.chromium.org/2673753005/diff/120001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (left): https://codereview.chromium.org/2673753005/diff/120001/chrome/app/generated_resources.grd#oldcode9989 chrome/app/generated_resources.grd:9989: Year Thank you for cleaning up unused strings. Would ...
3 years, 10 months ago (2017-02-07 21:55:22 UTC) #13
Mathieu
Thanks rouslan for components/payments anthony for c/b/ui/views/payments https://codereview.chromium.org/2673753005/diff/120001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (left): https://codereview.chromium.org/2673753005/diff/120001/chrome/app/generated_resources.grd#oldcode9989 chrome/app/generated_resources.grd:9989: Year On ...
3 years, 10 months ago (2017-02-08 02:03:25 UTC) #14
anthonyvd
Looking good! Got a few comments, including one that is pretty involved. Let me know ...
3 years, 10 months ago (2017-02-08 15:28:28 UTC) #15
please use gerrit instead
LGTM % comments https://codereview.chromium.org/2673753005/diff/140001/chrome/browser/ui/views/payments/editor_view_controller.h File chrome/browser/ui/views/payments/editor_view_controller.h (right): https://codereview.chromium.org/2673753005/diff/140001/chrome/browser/ui/views/payments/editor_view_controller.h#newcode52 chrome/browser/ui/views/payments/editor_view_controller.h:52: std::unordered_map<ValidatingTextfield*, const EditorField>; This might make ...
3 years, 10 months ago (2017-02-08 18:50:55 UTC) #16
Mathieu
Thanks, hope I addressed everything! https://codereview.chromium.org/2673753005/diff/140001/chrome/browser/ui/views/payments/editor_view_controller.cc File chrome/browser/ui/views/payments/editor_view_controller.cc (right): https://codereview.chromium.org/2673753005/diff/140001/chrome/browser/ui/views/payments/editor_view_controller.cc#newcode67 chrome/browser/ui/views/payments/editor_view_controller.cc:67: content_view->AddChildView(CreateInputField(field, &text_field).release()); On 2017/02/08 ...
3 years, 10 months ago (2017-02-08 21:21:51 UTC) #17
anthonyvd
lgtm, thanks! https://codereview.chromium.org/2673753005/diff/140001/chrome/browser/ui/views/payments/editor_view_controller.cc File chrome/browser/ui/views/payments/editor_view_controller.cc (right): https://codereview.chromium.org/2673753005/diff/140001/chrome/browser/ui/views/payments/editor_view_controller.cc#newcode67 chrome/browser/ui/views/payments/editor_view_controller.cc:67: content_view->AddChildView(CreateInputField(field, &text_field).release()); On 2017/02/08 at 21:21:50, Mathieu ...
3 years, 10 months ago (2017-02-09 14:29:27 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2673753005/220001
3 years, 10 months ago (2017-02-09 19:32:36 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/353129) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-02-09 19:36:57 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2673753005/240001
3 years, 10 months ago (2017-02-09 20:05:02 UTC) #30
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 21:17:40 UTC) #33
Message was sent while issue was closed.
Committed patchset #8 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/d4cfd8f80766dbadbbe6f0420230...

Powered by Google App Engine
This is Rietveld 408576698