Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Issue 6931029: Set datapresent string to contain precisely those field types available in stored Autofill data. (Closed)

Created:
9 years, 7 months ago by Ilya Sherman
Modified:
9 years, 7 months ago
Reviewers:
dhollowa
CC:
chromium-reviews, GeorgeY, pam+watch_chromium.org, Paweł Hajdan Jr., Ilya Sherman, dhollowa, vadimb
Visibility:
Public.

Description

Set datapresent string to contain precisely those field types available in stored Autofill data. This is what the toolbar server expects of all of its clients. BUG=none TEST=unit_tests --gtest_filter=PersonalDataManagerTest.GetAvailableFieldTypes:FormStructureTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84405

Patch Set 1 #

Patch Set 2 : OVERRIDE FTW #

Total comments: 9

Patch Set 3 : Don't SetInfo() for read-only fields #

Total comments: 4

Patch Set 4 : Un-nitting #

Patch Set 5 : Signed and delivered #

Unified diffs Side-by-side diffs Delta from patch set Stats (+634 lines, -235 lines) Patch
M chrome/browser/autofill/autofill_download.h View 2 chunks +11 lines, -7 lines 0 comments Download
M chrome/browser/autofill/autofill_download.cc View 1 chunk +11 lines, -6 lines 0 comments Download
M chrome/browser/autofill/autofill_download_unittest.cc View 5 chunks +13 lines, -6 lines 0 comments Download
M chrome/browser/autofill/autofill_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autofill/autofill_manager.cc View 1 2 3 4 3 chunks +25 lines, -19 lines 0 comments Download
M chrome/browser/autofill/autofill_merge_unittest.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/autofill/credit_card.cc View 1 2 3 chunks +20 lines, -0 lines 0 comments Download
M chrome/browser/autofill/form_structure.h View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/autofill/form_structure.cc View 4 chunks +60 lines, -48 lines 0 comments Download
M chrome/browser/autofill/form_structure_unittest.cc View 1 2 3 6 chunks +329 lines, -126 lines 0 comments Download
M chrome/browser/autofill/personal_data_manager.h View 4 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/autofill/personal_data_manager.cc View 1 2 3 6 chunks +22 lines, -7 lines 0 comments Download
M chrome/browser/autofill/personal_data_manager_mac.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autofill/personal_data_manager_unittest.cc View 1 chunk +125 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Ilya Sherman
If there are any other cases that you think would be useful to verify in ...
9 years, 7 months ago (2011-05-05 07:47:32 UTC) #1
dhollowa
http://codereview.chromium.org/6931029/diff/2001/chrome/browser/autofill/autofill_manager.cc File chrome/browser/autofill/autofill_manager.cc (right): http://codereview.chromium.org/6931029/diff/2001/chrome/browser/autofill/autofill_manager.cc#newcode566 chrome/browser/autofill/autofill_manager.cc:566: if (autofilled_form_signatures_.size() > 3) It is not clear why ...
9 years, 7 months ago (2011-05-06 03:06:19 UTC) #2
Ilya Sherman
http://codereview.chromium.org/6931029/diff/2001/chrome/browser/autofill/autofill_manager.cc File chrome/browser/autofill/autofill_manager.cc (right): http://codereview.chromium.org/6931029/diff/2001/chrome/browser/autofill/autofill_manager.cc#newcode566 chrome/browser/autofill/autofill_manager.cc:566: if (autofilled_form_signatures_.size() > 3) On 2011/05/06 03:06:20, dhollowa wrote: ...
9 years, 7 months ago (2011-05-06 03:33:07 UTC) #3
dhollowa
9 years, 7 months ago (2011-05-06 04:12:49 UTC) #4
LGTM.  Thanks.

http://codereview.chromium.org/6931029/diff/2001/chrome/browser/autofill/form...
File chrome/browser/autofill/form_structure_unittest.cc (right):

http://codereview.chromium.org/6931029/diff/2001/chrome/browser/autofill/form...
chrome/browser/autofill/form_structure_unittest.cc:1547: // The set bits are:
Yes, it is a small finite set of combinations.  So data-driven tests are
overkill, I agree.

I do like the idea however of a small |DatapresentToString(...)| utility that
spits out essentially what you have in these comments here.  Then if these tests
ever fail we don't have to manually decode bit-fields.

This is just a suggestion though.  I'll leave it up to you.

On 2011/05/06 03:33:07, Ilya Sherman wrote:
> On 2011/05/06 03:06:20, dhollowa wrote:
> > Great comments, very useful.  It makes me wonder however if we should have a
> > datapresent decoder that outputs a human-readable string.  Maybe a good
> > candidate for a data-driven set of tests?
> 
> It's just a quick python script away.  I'm not convinced that we really need a
> test that runs on each commit cycle though -- what code would it be
> exercising/testing?

Powered by Google App Engine
This is Rietveld 408576698