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

Unified Diff: chrome/browser/autofill/phone_number_unittest.cc

Issue 7892048: Autofill: Remove fax number completely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/phone_number_unittest.cc
diff --git a/chrome/browser/autofill/phone_number_unittest.cc b/chrome/browser/autofill/phone_number_unittest.cc
index 9a0641826141fa5cf6c935dac0e4858f969143e0..9532b3de493418f7c67c15e5f56cb6cc8b3f83ac 100644
--- a/chrome/browser/autofill/phone_number_unittest.cc
+++ b/chrome/browser/autofill/phone_number_unittest.cc
@@ -75,32 +75,12 @@ TEST(PhoneNumberTest, Matcher) {
EXPECT_EQ(1U, matching_types.size());
EXPECT_TRUE(matching_types.find(PHONE_HOME_CITY_AND_NUMBER) !=
matching_types.end());
-
- string16 fax(ASCIIToUTF16("+1(650)650-5678"));
- PhoneNumber fax_number(&profile);
- fax_number.SetInfo(PHONE_FAX_WHOLE_NUMBER, fax);
-
- matching_types.clear();
- fax_number.GetMatchingTypes(ASCIIToUTF16("16506505678"), &matching_types);
- EXPECT_EQ(1U, matching_types.size());
- EXPECT_TRUE(matching_types.find(PHONE_FAX_WHOLE_NUMBER) !=
- matching_types.end());
-
- matching_types.clear();
- fax_number.GetMatchingTypes(ASCIIToUTF16("650"), &matching_types);
- EXPECT_EQ(2U, matching_types.size());
- EXPECT_TRUE(matching_types.find(PHONE_FAX_CITY_CODE) !=
- matching_types.end());
- EXPECT_TRUE(matching_types.find(PHONE_FAX_NUMBER) !=
- matching_types.end());
}
TEST(PhoneNumberTest, PhoneCombineHelper) {
PhoneNumber::PhoneCombineHelper number1(AutofillType::PHONE_HOME);
EXPECT_FALSE(number1.SetInfo(ADDRESS_BILLING_CITY,
ASCIIToUTF16("1")));
- EXPECT_FALSE(number1.SetInfo(PHONE_FAX_COUNTRY_CODE,
- ASCIIToUTF16("1")));
EXPECT_TRUE(number1.SetInfo(PHONE_HOME_COUNTRY_CODE,
ASCIIToUTF16("1")));
EXPECT_TRUE(number1.SetInfo(PHONE_HOME_CITY_CODE,
@@ -112,19 +92,6 @@ TEST(PhoneNumberTest, PhoneCombineHelper) {
// International format as it has a country code.
EXPECT_EQ(ASCIIToUTF16("+1 650-234-5678"), parsed_phone);
- PhoneNumber::PhoneCombineHelper number2(AutofillType::PHONE_FAX);
- EXPECT_FALSE(number2.SetInfo(PHONE_HOME_COUNTRY_CODE,
- ASCIIToUTF16("1")));
- EXPECT_TRUE(number2.SetInfo(PHONE_FAX_COUNTRY_CODE,
- ASCIIToUTF16("1")));
- EXPECT_TRUE(number2.SetInfo(PHONE_FAX_CITY_CODE,
- ASCIIToUTF16("650")));
- EXPECT_TRUE(number2.SetInfo(PHONE_FAX_NUMBER,
- ASCIIToUTF16("2345679")));
- EXPECT_TRUE(number2.ParseNumber("US", &parsed_phone));
- // International format as it has a country code.
- EXPECT_EQ(ASCIIToUTF16("+1 650-234-5679"), parsed_phone);
-
PhoneNumber::PhoneCombineHelper number3(AutofillType::PHONE_HOME);
EXPECT_TRUE(number3.SetInfo(PHONE_HOME_CITY_CODE,
ASCIIToUTF16("650")));

Powered by Google App Engine
This is Rietveld 408576698