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

Side by Side Diff: components/autofill/core/browser/autofill_country_unittest.cc

Issue 2326013002: Country code XK also doesn't have a country name on JB (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/autofill/core/browser/autofill_country.h" 10 #include "components/autofill/core/browser/autofill_country.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 // Test mapping all country codes to country names. 55 // Test mapping all country codes to country names.
56 TEST(AutofillCountryTest, AllCountryCodesHaveCountryName) { 56 TEST(AutofillCountryTest, AllCountryCodesHaveCountryName) {
57 std::set<std::string> expected_failures; 57 std::set<std::string> expected_failures;
58 #if defined(ANDROID) 58 #if defined(ANDROID)
59 if (base::android::BuildInfo::GetInstance()->sdk_int() < 59 if (base::android::BuildInfo::GetInstance()->sdk_int() <
60 base::android::SDK_VERSION_KITKAT) { 60 base::android::SDK_VERSION_KITKAT) {
61 expected_failures.insert("BQ"); 61 expected_failures.insert("BQ");
62 expected_failures.insert("SS"); 62 expected_failures.insert("SS");
63 expected_failures.insert("XK");
63 } 64 }
64 #endif 65 #endif
65 const std::vector<std::string>& country_codes = 66 const std::vector<std::string>& country_codes =
66 CountryDataMap::GetInstance()->country_codes(); 67 CountryDataMap::GetInstance()->country_codes();
67 for (const std::string& country_code : country_codes) { 68 for (const std::string& country_code : country_codes) {
68 if (base::ContainsKey(expected_failures, country_code)) 69 if (base::ContainsKey(expected_failures, country_code))
69 continue; 70 continue;
70 SCOPED_TRACE("Country code '" + country_code + "' should have a name."); 71 SCOPED_TRACE("Country code '" + country_code + "' should have a name.");
71 EXPECT_NE(ASCIIToUTF16(country_code), 72 EXPECT_NE(ASCIIToUTF16(country_code),
72 AutofillCountry(country_code, "en").name()); 73 AutofillCountry(country_code, "en").name());
73 } 74 }
74 } 75 }
75 76
76 } // namespace autofill 77 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698