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

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

Issue 355823007: Adjust autofill phone number format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update android test. Created 6 years, 5 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
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/autofill_ie_toolbar_import_win.h" 5 #include "components/autofill/core/browser/autofill_ie_toolbar_import_win.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/win/registry.h" 9 #include "base/win/registry.h"
10 #include "components/autofill/core/browser/autofill_profile.h" 10 #include "components/autofill/core/browser/autofill_profile.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 EXPECT_EQ(profile1[1].value, profiles[1].GetRawInfo(NAME_MIDDLE)); 168 EXPECT_EQ(profile1[1].value, profiles[1].GetRawInfo(NAME_MIDDLE));
169 EXPECT_EQ(profile1[2].value, profiles[1].GetRawInfo(NAME_LAST)); 169 EXPECT_EQ(profile1[2].value, profiles[1].GetRawInfo(NAME_LAST));
170 EXPECT_EQ(profile1[3].value, profiles[1].GetRawInfo(EMAIL_ADDRESS)); 170 EXPECT_EQ(profile1[3].value, profiles[1].GetRawInfo(EMAIL_ADDRESS));
171 EXPECT_EQ(profile1[4].value, profiles[1].GetRawInfo(COMPANY_NAME)); 171 EXPECT_EQ(profile1[4].value, profiles[1].GetRawInfo(COMPANY_NAME));
172 EXPECT_EQ(profile1[7].value, 172 EXPECT_EQ(profile1[7].value,
173 profiles[1].GetInfo(AutofillType(PHONE_HOME_COUNTRY_CODE), "US")); 173 profiles[1].GetInfo(AutofillType(PHONE_HOME_COUNTRY_CODE), "US"));
174 EXPECT_EQ(profile1[6].value, 174 EXPECT_EQ(profile1[6].value,
175 profiles[1].GetInfo(AutofillType(PHONE_HOME_CITY_CODE), "US")); 175 profiles[1].GetInfo(AutofillType(PHONE_HOME_CITY_CODE), "US"));
176 EXPECT_EQ(L"5555555", 176 EXPECT_EQ(L"5555555",
177 profiles[1].GetInfo(AutofillType(PHONE_HOME_NUMBER), "US")); 177 profiles[1].GetInfo(AutofillType(PHONE_HOME_NUMBER), "US"));
178 EXPECT_EQ(L"+1 650-555-5555", 178 EXPECT_EQ(L"1 650-555-5555", profiles[1].GetRawInfo(PHONE_HOME_WHOLE_NUMBER));
179 profiles[1].GetRawInfo(PHONE_HOME_WHOLE_NUMBER));
180 179
181 EXPECT_EQ(profile2[0].value, profiles[0].GetRawInfo(NAME_FIRST)); 180 EXPECT_EQ(profile2[0].value, profiles[0].GetRawInfo(NAME_FIRST));
182 EXPECT_EQ(profile2[1].value, profiles[0].GetRawInfo(NAME_LAST)); 181 EXPECT_EQ(profile2[1].value, profiles[0].GetRawInfo(NAME_LAST));
183 EXPECT_EQ(profile2[2].value, profiles[0].GetRawInfo(EMAIL_ADDRESS)); 182 EXPECT_EQ(profile2[2].value, profiles[0].GetRawInfo(EMAIL_ADDRESS));
184 EXPECT_EQ(profile2[3].value, profiles[0].GetRawInfo(COMPANY_NAME)); 183 EXPECT_EQ(profile2[3].value, profiles[0].GetRawInfo(COMPANY_NAME));
185 184
186 ASSERT_EQ(1U, credit_cards.size()); 185 ASSERT_EQ(1U, credit_cards.size());
187 EXPECT_EQ(credit_card[0].value, credit_cards[0].GetRawInfo(CREDIT_CARD_NAME)); 186 EXPECT_EQ(credit_card[0].value, credit_cards[0].GetRawInfo(CREDIT_CARD_NAME));
188 EXPECT_EQ(L"4111111111111111", 187 EXPECT_EQ(L"4111111111111111",
189 credit_cards[0].GetRawInfo(CREDIT_CARD_NUMBER)); 188 credit_cards[0].GetRawInfo(CREDIT_CARD_NUMBER));
(...skipping 12 matching lines...) Expand all
202 profiles.clear(); 201 profiles.clear();
203 credit_cards.clear(); 202 credit_cards.clear();
204 EXPECT_TRUE(ImportCurrentUserProfiles("en-US", &profiles, &credit_cards)); 203 EXPECT_TRUE(ImportCurrentUserProfiles("en-US", &profiles, &credit_cards));
205 // Profiles are not protected. 204 // Profiles are not protected.
206 EXPECT_EQ(2U, profiles.size()); 205 EXPECT_EQ(2U, profiles.size());
207 // Credit cards are. 206 // Credit cards are.
208 EXPECT_EQ(0U, credit_cards.size()); 207 EXPECT_EQ(0U, credit_cards.size());
209 } 208 }
210 209
211 } // namespace autofill 210 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/data_model_wrapper_unittest.cc ('k') | components/autofill/core/browser/phone_number_i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698