• sandromaggi's avatar
    [Autofill Assistant] Use state as fallback for state name · 11cd1e9d
    sandromaggi authored
    If the state name cannot be resolved from the hardcoded list,
    use the state value itself. This guarantees a value in state
    name (if there is a value in state).
    
    For addresses created from Desktop, the state field can be
    free text, it is not guaranteed to map to a known state. The
    same goes for countries outside of the US, where the state
    name cannot be resolved in the first place.
    
    This also changes the expectation in the unit test, to not block
    the addition of new fields. Note that we still assert the minimum
    set of expected fields, essentially blocking the removal of
    previously available information.
    
    Bug: b/169562881
    Bug: b/167491545
    Change-Id: I1b392e7a7e8a21981d751d6b9ae982de4adfff3b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438352
    Commit-Queue: Sandro Maggi <sandromaggi@google.com>
    Reviewed-by: default avatarClemens Arbesser <arbesser@google.com>
    Cr-Commit-Position: refs/heads/master@{#812094}
    11cd1e9d
field_formatter_unittest.cc 7.9 KB