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

Unified Diff: components/autofill/core/browser/autofill_country_unittest.cc

Issue 2321023002: Skip BQ and SS country codes when AutoFillCountryTest is running 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_country_unittest.cc
diff --git a/components/autofill/core/browser/autofill_country_unittest.cc b/components/autofill/core/browser/autofill_country_unittest.cc
index 855cda269ad36941ce5ca2ff02fa6855b7922c6b..bfdb4bb40dc581a59b4563381e9a4ddb40b218a8 100644
--- a/components/autofill/core/browser/autofill_country_unittest.cc
+++ b/components/autofill/core/browser/autofill_country_unittest.cc
@@ -2,12 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <set>
#include <string>
+#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_country.h"
#include "components/autofill/core/browser/country_data.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(ANDROID)
+#include "base/android/build_info.h"
+#endif
using base::ASCIIToUTF16;
@@ -49,9 +54,19 @@ TEST(AutofillCountryTest, CountryCodeForLocale) {
// Test mapping all country codes to country names.
TEST(AutofillCountryTest, AllCountryCodesHaveCountryName) {
+ std::set<std::string> expected_failures;
+#if defined(ANDROID)
+ if (base::android::BuildInfo::GetInstance()->sdk_int() <
+ base::android::SDK_VERSION_KITKAT) {
+ expected_failures.insert("BQ");
+ expected_failures.insert("SS");
+ }
+#endif
const std::vector<std::string>& country_codes =
CountryDataMap::GetInstance()->country_codes();
for (const std::string& country_code : country_codes) {
+ if (base::ContainsKey(expected_failures, country_code))
+ continue;
SCOPED_TRACE("Country code '" + country_code + "' should have a name.");
EXPECT_NE(ASCIIToUTF16(country_code),
AutofillCountry(country_code, "en").name());
« 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