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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_i18n_input_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "components/autofill/core/browser/field_types.h" 9 #include "components/autofill/core/browser/field_types.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/addre ss_ui.h"
11 12
12 namespace autofill { 13 namespace autofill {
13 namespace i18ninput { 14 namespace i18ninput {
14 15
15 namespace { 16 namespace {
16 17
17 const size_t kNumberOfAddressLinesUS = 7; 18 const size_t kNumberOfAddressLinesUS = 7;
18 19
19 } // namespace 20 } // namespace
20 21
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 68 }
68 69
69 TEST(AutofillDialogI18nInput, IvoryCoastNoStreetLine2) { 70 TEST(AutofillDialogI18nInput, IvoryCoastNoStreetLine2) {
70 DetailInputs inputs; 71 DetailInputs inputs;
71 BuildAddressInputs(common::ADDRESS_TYPE_SHIPPING, "CI", &inputs); 72 BuildAddressInputs(common::ADDRESS_TYPE_SHIPPING, "CI", &inputs);
72 for (size_t i = 0; i < inputs.size(); ++i) { 73 for (size_t i = 0; i < inputs.size(); ++i) {
73 EXPECT_NE(ADDRESS_HOME_LINE2, inputs[i].type); 74 EXPECT_NE(ADDRESS_HOME_LINE2, inputs[i].type);
74 } 75 }
75 } 76 }
76 77
78 TEST(AutofillDialogI18nInput, FullySupportedCountries) {
79 const std::vector<std::string>& regions =
80 ::i18n::addressinput::GetRegionCodes();
81 for (size_t i = 0; i < regions.size(); ++i) {
82 bool should_be_supported = !(regions[i] == "KR" || regions[i] == "CN");
83 EXPECT_EQ(should_be_supported, CountryIsFullySupported(regions[i]));
84 }
85 }
86
77 } // namespace i18ninput 87 } // namespace i18ninput
78 } // namespace autofill 88 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc ('k') | chrome/browser/ui/autofill/country_combobox_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698