From 7961cea6d1041e3e454dae6a1da660b453efd238 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 20 Jan 2020 13:40:20 +0100 Subject: BASELINE: Update Chromium to 78.0.3904.130 Change-Id: If185e0c0061b3437531c97c9c8c78f239352a68b Reviewed-by: Allan Sandfeld Jensen --- .../core/browser/geo/phone_number_i18n_unittest.cc | 18 ++++++++++-------- .../core/browser/geo/subkey_requester_unittest.cc | 6 +++--- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'chromium/components/autofill/core/browser/geo') diff --git a/chromium/components/autofill/core/browser/geo/phone_number_i18n_unittest.cc b/chromium/components/autofill/core/browser/geo/phone_number_i18n_unittest.cc index afcf07ba45c..4f4e36e3357 100644 --- a/chromium/components/autofill/core/browser/geo/phone_number_i18n_unittest.cc +++ b/chromium/components/autofill/core/browser/geo/phone_number_i18n_unittest.cc @@ -101,14 +101,14 @@ INSTANTIATE_TEST_SUITE_P( ParseNumberTestCase{false, "1234", "US"}, // Too long strings should not be parsed. ParseNumberTestCase{false, GenerateTooLongString(), "US"}, - // Test for string with exactly 7 digits. - // Still a possible number with unknown("ZZ") deduced region. - ParseNumberTestCase{true, "17134567", "US", "7134567", "", "1", "ZZ"}, + // Test for string with exactly 7 digits. It is too short. + // Should fail parsing in US. + ParseNumberTestCase{false, "17134567", "US"}, // Does not have area code, but still a possible number with // unknown("ZZ") deduced region. ParseNumberTestCase{true, "7134567", "US", "7134567", "", "", "ZZ"}, // Valid Canadian toll-free number. - ParseNumberTestCase{true, "3101234", "US", "3101234", "", "", "CA"}, + ParseNumberTestCase{true, "3101234", "CA", "3101234", "", "", "ZZ"}, // Test for string with greater than 7 digits but less than 10 digits. // Should fail parsing in US. ParseNumberTestCase{false, "123456789", "US"}, @@ -132,8 +132,10 @@ INSTANTIATE_TEST_SUITE_P( ParseNumberTestCase{false, "1\xC0", "US"}, // Test for string with exactly 10 digits. // Should give back phone number and city code. - // This one going to fail because of the incorrect area code. - ParseNumberTestCase{false, "1234567890", "US"}, + // This one has an incorrect area code but could still be a possible + // number with unknown("ZZ") deducted region. + ParseNumberTestCase{true, "1234567890", "US", "1234567890", "", "", + "ZZ"}, // This is actually not a valid number because the first number after // area code is 1. But it's still a possible number, just with deduced // country set to unknown("ZZ"). @@ -401,8 +403,8 @@ INSTANTIATE_TEST_SUITE_P( // A US phone with the country code is correctly formatted as an US // number. PhoneNumberFormatCase("+1 415-555-5555", "MX", "+1 415-555-5555"), - // "+52 1 415 555 5555" is a valid number for Mexico, - PhoneNumberFormatCase("1 415-555-5555", "MX", "+52 1 415 555 5555"), + // "+52 415 555 5555" is a valid number for Mexico, + PhoneNumberFormatCase("1 415-555-5555", "MX", "+52 415 555 5555"), // Without a country code, the phone is formatted for the profile's // country. PhoneNumberFormatCase("415-555-5555", "MX", "+52 415 555 5555"), diff --git a/chromium/components/autofill/core/browser/geo/subkey_requester_unittest.cc b/chromium/components/autofill/core/browser/geo/subkey_requester_unittest.cc index 4ae481a5fa8..cb9673365d9 100644 --- a/chromium/components/autofill/core/browser/geo/subkey_requester_unittest.cc +++ b/chromium/components/autofill/core/browser/geo/subkey_requester_unittest.cc @@ -11,7 +11,7 @@ #include "base/files/file_path.h" #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" -#include "base/test/scoped_task_environment.h" +#include "base/test/task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/libaddressinput/src/cpp/include/libaddressinput/null_storage.h" #include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h" @@ -102,7 +102,7 @@ class SubKeyRequesterTest : public testing::Test { ~SubKeyRequesterTest() override {} - base::test::ScopedTaskEnvironment scoped_task_environment_; + base::test::TaskEnvironment task_environment_; std::unique_ptr requester_; private: @@ -157,7 +157,7 @@ TEST_F(SubKeyRequesterTest, StartRequest_RulesNotLoaded_WillNotLoad) { requester_->StartRegionSubKeysRequest(kLocale, kLanguage, 0, std::move(cb)); // Let the timeout execute. - scoped_task_environment_.RunUntilIdle(); + task_environment_.RunUntilIdle(); // Since the rules are never loaded and the timeout is 0, the delegate should // get notified that the subkeys could not be received. -- cgit v1.2.1