OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/autofill/phone_number_i18n.h" | 6 #include "chrome/browser/autofill/phone_number_i18n.h" |
7 #include "chrome/test/testing_browser_process_test.h" | 7 #include "chrome/test/base/testing_browser_process_test.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 using autofill_i18n::NormalizePhoneNumber; | 10 using autofill_i18n::NormalizePhoneNumber; |
11 using autofill_i18n::ParsePhoneNumber; | 11 using autofill_i18n::ParsePhoneNumber; |
12 using autofill_i18n::ConstructPhoneNumber; | 12 using autofill_i18n::ConstructPhoneNumber; |
13 using autofill_i18n::FormatPhone; | 13 using autofill_i18n::FormatPhone; |
14 using autofill_i18n::ComparePhones; | 14 using autofill_i18n::ComparePhones; |
15 using autofill_i18n::PhoneNumbersMatch; | 15 using autofill_i18n::PhoneNumbersMatch; |
16 | 16 |
17 typedef TestingBrowserProcessTest PhoneNumberI18NTest; | 17 typedef TestingBrowserProcessTest PhoneNumberI18NTest; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 "US")); | 399 "US")); |
400 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"), | 400 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"), |
401 ASCIIToUTF16("415 TUV WXYZ"), | 401 ASCIIToUTF16("415 TUV WXYZ"), |
402 "US")); | 402 "US")); |
403 | 403 |
404 // Partial matches don't count. | 404 // Partial matches don't count. |
405 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), | 405 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), |
406 ASCIIToUTF16("8889999"), | 406 ASCIIToUTF16("8889999"), |
407 "US")); | 407 "US")); |
408 } | 408 } |
OLD | NEW |