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

Side by Side Diff: components/autofill/core/browser/personal_data_manager_unittest.cc

Issue 2676343002: Revert of [Autofill] Use user's email for converted wallet addresses. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/autofill/core/browser/personal_data_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/browser/personal_data_manager.h" 5 #include "components/autofill/core/browser/personal_data_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 5675 matching lines...) Expand 10 before | Expand all | Expand 10 after
5686 ASSERT_EQ(2U, profiles.size()); 5686 ASSERT_EQ(2U, profiles.size());
5687 EXPECT_EQ(UTF8ToUTF16("John"), profiles[0]->GetRawInfo(NAME_FIRST)); 5687 EXPECT_EQ(UTF8ToUTF16("John"), profiles[0]->GetRawInfo(NAME_FIRST));
5688 EXPECT_EQ(local_profile, *profiles[1]); 5688 EXPECT_EQ(local_profile, *profiles[1]);
5689 5689
5690 // Make sure that the billing address id of the two cards now point to the 5690 // Make sure that the billing address id of the two cards now point to the
5691 // converted profile. 5691 // converted profile.
5692 EXPECT_EQ(profiles[0]->guid(), 5692 EXPECT_EQ(profiles[0]->guid(),
5693 personal_data_->GetCreditCards()[0]->billing_address_id()); 5693 personal_data_->GetCreditCards()[0]->billing_address_id());
5694 EXPECT_EQ(profiles[0]->guid(), 5694 EXPECT_EQ(profiles[0]->guid(),
5695 personal_data_->GetCreditCards()[1]->billing_address_id()); 5695 personal_data_->GetCreditCards()[1]->billing_address_id());
5696
5697 // Make sure that the added address has the email address of the currently
5698 // signed-in user.
5699 EXPECT_EQ(UTF8ToUTF16("syncuser@example.com"),
5700 profiles[0]->GetRawInfo(EMAIL_ADDRESS));
5701 } 5696 }
5702 5697
5703 // Tests that the converted wallet address is merged into an existing local 5698 // Tests that the converted wallet address is merged into an existing local
5704 // profile if they are considered equivalent. Also tests that the billing 5699 // profile if they are considered equivalent. Also tests that the billing
5705 // address relationship was transferred to the converted address. 5700 // address relationship was transferred to the converted address.
5706 TEST_F(PersonalDataManagerTest, 5701 TEST_F(PersonalDataManagerTest,
5707 ConvertWalletAddressesToLocalProfiles_MergedProfile) { 5702 ConvertWalletAddressesToLocalProfiles_MergedProfile) {
5708 /////////////////////////////////////////////////////////////////////// 5703 ///////////////////////////////////////////////////////////////////////
5709 // Setup. 5704 // Setup.
5710 /////////////////////////////////////////////////////////////////////// 5705 ///////////////////////////////////////////////////////////////////////
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
5977 5972
5978 // Make sure that the billing address id of the two cards now point to the 5973 // Make sure that the billing address id of the two cards now point to the
5979 // converted profile. 5974 // converted profile.
5980 EXPECT_EQ(profiles[0]->guid(), 5975 EXPECT_EQ(profiles[0]->guid(),
5981 personal_data_->GetCreditCards()[0]->billing_address_id()); 5976 personal_data_->GetCreditCards()[0]->billing_address_id());
5982 EXPECT_EQ(profiles[0]->guid(), 5977 EXPECT_EQ(profiles[0]->guid(),
5983 personal_data_->GetCreditCards()[1]->billing_address_id()); 5978 personal_data_->GetCreditCards()[1]->billing_address_id());
5984 } 5979 }
5985 5980
5986 } // namespace autofill 5981 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/personal_data_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698