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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc

Issue 172783003: rAc: don't show countries with partially supported address fields for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
index c2bf48a9aa254e152492807ee6c896e40aab477c..dc75c6a65617bd0760d959dac3253e41b89a0a3b 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
@@ -2961,6 +2961,21 @@ TEST_F(AutofillDialogControllerTest, IconReservedForCreditCardField) {
}
}
+TEST_F(AutofillDialogControllerTest, NoPartiallySupportedCountriesSuggested) {
+ SwitchToAutofill();
+
+ std::string partially_supported_country = "KR";
+ ASSERT_FALSE(i18ninput::CountryIsFullySupported(partially_supported_country));
+ ASSERT_FALSE(controller()->MenuModelForSection(SECTION_BILLING));
+
+ AutofillProfile verified_profile(test::GetVerifiedProfile());
+ verified_profile.SetRawInfo(ADDRESS_HOME_COUNTRY,
+ ASCIIToUTF16(partially_supported_country));
+ controller()->GetTestingManager()->AddTestingProfile(&verified_profile);
+
+ EXPECT_FALSE(controller()->MenuModelForSection(SECTION_BILLING));
+}
+
class AutofillDialogControllerI18nTest : public AutofillDialogControllerTest {
private:
i18ninput::ScopedEnableForTesting enabled_;
@@ -3008,10 +3023,10 @@ TEST_F(AutofillDialogControllerI18nTest, CountryChangeUpdatesSection) {
TEST_F(AutofillDialogControllerI18nTest, CorrectCountryFromInputs) {
EXPECT_CALL(*controller()->GetMockValidator(),
- ValidateAddress(CountryCodeMatcher("CN"), _, _));
+ ValidateAddress(CountryCodeMatcher("DE"), _, _));
FieldValueMap billing_inputs;
- billing_inputs[ADDRESS_BILLING_COUNTRY] = ASCIIToUTF16("China");
+ billing_inputs[ADDRESS_BILLING_COUNTRY] = ASCIIToUTF16("Germany");
controller()->InputsAreValid(SECTION_BILLING, billing_inputs);
EXPECT_CALL(*controller()->GetMockValidator(),
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_i18n_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698