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

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

Issue 13973004: Convert string16 -> base::string16 in components/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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: components/autofill/browser/phone_number_unittest.cc
diff --git a/components/autofill/browser/phone_number_unittest.cc b/components/autofill/browser/phone_number_unittest.cc
index 2fabb0bf291ad92dcf04a9caa966cfa62d7c743f..e82e14d4b8ed0941b0588f82e1c80cdfeca60023 100644
--- a/components/autofill/browser/phone_number_unittest.cc
+++ b/components/autofill/browser/phone_number_unittest.cc
@@ -14,12 +14,12 @@ TEST(PhoneNumberTest, Matcher) {
AutofillProfile profile;
profile.SetRawInfo(ADDRESS_HOME_COUNTRY, ASCIIToUTF16("US"));
// Set phone number so country_code == 1, city_code = 650, number = 2345678.
- string16 phone(ASCIIToUTF16("1 [650] 234-5678"));
+ base::string16 phone(ASCIIToUTF16("1 [650] 234-5678"));
PhoneNumber phone_number(&profile);
phone_number.SetInfo(PHONE_HOME_WHOLE_NUMBER, phone, "US");
FieldTypeSet matching_types;
- phone_number.GetMatchingTypes(string16(), "US", &matching_types);
+ phone_number.GetMatchingTypes(base::string16(), "US", &matching_types);
EXPECT_EQ(1U, matching_types.size());
EXPECT_TRUE(matching_types.find(EMPTY_TYPE) != matching_types.end());
matching_types.clear();
@@ -86,7 +86,7 @@ TEST(PhoneNumberTest, SetInfo) {
profile.SetRawInfo(ADDRESS_HOME_COUNTRY, ASCIIToUTF16("US"));
PhoneNumber phone(&profile);
- EXPECT_EQ(string16(), phone.GetRawInfo(PHONE_HOME_WHOLE_NUMBER));
+ EXPECT_EQ(base::string16(), phone.GetRawInfo(PHONE_HOME_WHOLE_NUMBER));
// Set the formatted info directly.
EXPECT_TRUE(phone.SetInfo(PHONE_HOME_WHOLE_NUMBER,
@@ -110,7 +110,7 @@ TEST(PhoneNumberTest, SetInfo) {
// start with the digit '1'.
EXPECT_FALSE(phone.SetInfo(PHONE_HOME_WHOLE_NUMBER,
ASCIIToUTF16("650111111"), "US"));
- EXPECT_EQ(string16(), phone.GetRawInfo(PHONE_HOME_WHOLE_NUMBER));
+ EXPECT_EQ(base::string16(), phone.GetRawInfo(PHONE_HOME_WHOLE_NUMBER));
}
// Test that cached phone numbers are correctly invalidated and updated.
@@ -129,7 +129,7 @@ TEST(PhoneNumberTest, UpdateCachedPhoneNumber) {
// Change the phone number to have a UK format, but try to parse with the
// wrong locale.
phone.SetRawInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("07023456789"));
- EXPECT_EQ(string16(), phone.GetInfo(PHONE_HOME_CITY_CODE, "US"));
+ EXPECT_EQ(base::string16(), phone.GetInfo(PHONE_HOME_CITY_CODE, "US"));
// Now try parsing using the correct locale. Note that the profile's country
// code should override the app locale, which is still set to "US".
@@ -151,7 +151,7 @@ TEST(PhoneNumberTest, PhoneCombineHelper) {
ASCIIToUTF16("650")));
EXPECT_TRUE(number1.SetInfo(PHONE_HOME_NUMBER,
ASCIIToUTF16("2345678")));
- string16 parsed_phone;
+ base::string16 parsed_phone;
EXPECT_TRUE(number1.ParseNumber(profile, "en-US", &parsed_phone));
// International format as it has a country code.
EXPECT_EQ(ASCIIToUTF16("+1 650-234-5678"), parsed_phone);
@@ -171,7 +171,7 @@ TEST(PhoneNumberTest, PhoneCombineHelper) {
EXPECT_TRUE(number4.SetInfo(PHONE_HOME_NUMBER,
ASCIIToUTF16("2345680")));
EXPECT_FALSE(number4.ParseNumber(profile, "en-US", &parsed_phone));
- EXPECT_EQ(string16(), parsed_phone);
+ EXPECT_EQ(base::string16(), parsed_phone);
PhoneNumber::PhoneCombineHelper number5;
EXPECT_TRUE(number5.SetInfo(PHONE_HOME_CITY_AND_NUMBER,

Powered by Google App Engine
This is Rietveld 408576698