| OLD | NEW |
| 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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 #include "base/strings/string16.h" | 6 #include "base/strings/string16.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "components/autofill/core/browser/phone_number_i18n.h" | 8 #include "components/autofill/core/browser/phone_number_i18n.h" |
| 9 #include "content/public/test/test_browser_thread.h" | 9 #include "content/public/test/test_browser_thread.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "third_party/libphonenumber/src/phonenumber_api.h" | 11 #include "third_party/libphonenumber/src/phonenumber_api.h" |
| 12 | 12 |
| 13 using base::ASCIIToUTF16; |
| 14 using base::UTF8ToUTF16; |
| 13 using content::BrowserThread; | 15 using content::BrowserThread; |
| 14 | 16 |
| 15 namespace autofill { | 17 namespace autofill { |
| 16 | 18 |
| 17 using i18n::NormalizePhoneNumber; | 19 using i18n::NormalizePhoneNumber; |
| 18 using i18n::ParsePhoneNumber; | 20 using i18n::ParsePhoneNumber; |
| 19 using i18n::ConstructPhoneNumber; | 21 using i18n::ConstructPhoneNumber; |
| 20 using i18n::PhoneNumbersMatch; | 22 using i18n::PhoneNumbersMatch; |
| 21 | 23 |
| 22 TEST(PhoneNumberI18NTest, NormalizePhoneNumber) { | 24 TEST(PhoneNumberI18NTest, NormalizePhoneNumber) { |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 "en-US")); | 382 "en-US")); |
| 381 | 383 |
| 382 // Different numbers don't match. | 384 // Different numbers don't match. |
| 383 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), | 385 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), |
| 384 ASCIIToUTF16("1415888"), | 386 ASCIIToUTF16("1415888"), |
| 385 "US", | 387 "US", |
| 386 "en-US")); | 388 "en-US")); |
| 387 } | 389 } |
| 388 | 390 |
| 389 } // namespace autofill | 391 } // namespace autofill |
| OLD | NEW |