Commit a67d4e44 authored by Jaeyong Bae's avatar Jaeyong Bae Committed by Commit Bot

Fix bug that name doesn't get cleared in address

This patch means bug fixing that Name doesn't get cleared
from chrome://settings/addresses page after editing address.

Bug: 965437
Change-Id: I8ebeee9e6eaa230f0293d9fa1c44cb9d975d7a26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1830479Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Reviewed-by: default avatarsebsg <sebsg@chromium.org>
Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Jaeyong Bae <jdragon.bae@gmail.com>
Cr-Commit-Position: refs/heads/master@{#709030}
parent 77223bd8
...@@ -139,12 +139,6 @@ base::string16 NameInfo::MiddleInitial() const { ...@@ -139,12 +139,6 @@ base::string16 NameInfo::MiddleInitial() const {
void NameInfo::SetFullName(const base::string16& full) { void NameInfo::SetFullName(const base::string16& full) {
full_ = full; full_ = full;
// If |full| is empty, leave the other name parts alone. This might occur
// due to a migrated database with an empty |full_name| value.
if (full.empty())
return;
data_util::NameParts parts = data_util::SplitName(full); data_util::NameParts parts = data_util::SplitName(full);
given_ = parts.given; given_ = parts.given;
middle_ = parts.middle; middle_ = parts.middle;
......
...@@ -1265,8 +1265,9 @@ TEST_F(PaymentRequestTest, CanPay) { ...@@ -1265,8 +1265,9 @@ TEST_F(PaymentRequestTest, CanPay) {
&test_personal_data_manager_); &test_personal_data_manager_);
EXPECT_FALSE(payment_request5.IsAbleToPay()); EXPECT_FALSE(payment_request5.IsAbleToPay());
profile.SetInfo(autofill::AutofillType(autofill::NAME_FULL), test_personal_data_manager_.GetProfiles()[0]->SetInfo(
base::ASCIIToUTF16("John Doe"), "en-US"); autofill::AutofillType(autofill::NAME_FULL),
base::ASCIIToUTF16("John Doe"), "en-US");
// Has a selected shipping address, but no selected shipping option. // Has a selected shipping address, but no selected shipping option.
payments::TestPaymentRequest payment_request6( payments::TestPaymentRequest payment_request6(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment