Lines Matching refs:country

17 // Test that country data can be properly returned as either a country code or a
18 // localized country name.
23 // Make sure that nothing breaks when the country code is missing.
24 base::string16 country =
26 EXPECT_EQ(base::string16(), country);
30 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
31 EXPECT_EQ(ASCIIToUTF16("United States"), country);
32 country = address.GetInfo(
34 EXPECT_EQ(ASCIIToUTF16("United States"), country);
35 country = address.GetInfo(
37 EXPECT_EQ(ASCIIToUTF16("US"), country);
40 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
41 EXPECT_EQ(ASCIIToUTF16("Canada"), country);
42 country = address.GetInfo(
44 EXPECT_EQ(ASCIIToUTF16("Canada"), country);
45 country = address.GetInfo(
47 EXPECT_EQ(ASCIIToUTF16("CA"), country);
50 // Test that we properly detect country codes appropriate for each country.
59 base::string16 country =
62 EXPECT_EQ(ASCIIToUTF16("United States"), country);
67 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
69 EXPECT_EQ(ASCIIToUTF16("United States"), country);
74 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
76 EXPECT_EQ(ASCIIToUTF16("Canada"), country);
78 // Test country code detection.
81 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
83 EXPECT_EQ(ASCIIToUTF16("Japan"), country);
88 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
90 EXPECT_EQ(base::string16(), country);
92 // Test setting the country based on an HTML field type.
96 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
98 EXPECT_EQ(ASCIIToUTF16("United States"), country);
100 // Test case-insensitivity when setting the country based on an HTML field
103 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
105 EXPECT_EQ(ASCIIToUTF16("Canada"), country);
107 // Test setting the country based on invalid data with an HTML field type.
109 country = address.GetInfo(AutofillType(ADDRESS_HOME_COUNTRY), "en-US");
111 EXPECT_EQ(base::string16(), country);
114 // Test that we properly match typed values to stored country data.
146 // Make sure that garbage values don't match when the country code is empty.