OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "base/message_loop.h" |
6 #include "base/string16.h" | 6 #include "base/string16.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/autofill/phone_number_i18n.h" | 8 #include "chrome/browser/autofill/phone_number_i18n.h" |
9 #include "content/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 | 11 |
12 using autofill_i18n::NormalizePhoneNumber; | 12 using autofill_i18n::NormalizePhoneNumber; |
13 using autofill_i18n::ParsePhoneNumber; | 13 using autofill_i18n::ParsePhoneNumber; |
14 using autofill_i18n::ConstructPhoneNumber; | 14 using autofill_i18n::ConstructPhoneNumber; |
15 using autofill_i18n::PhoneNumbersMatch; | 15 using autofill_i18n::PhoneNumbersMatch; |
16 using content::BrowserThread; | 16 using content::BrowserThread; |
17 | 17 |
18 class PhoneNumberI18NTest : public testing::Test { | 18 class PhoneNumberI18NTest : public testing::Test { |
19 public: | 19 public: |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // Partial matches don't count. | 371 // Partial matches don't count. |
372 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), | 372 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), |
373 ASCIIToUTF16("8889999"), | 373 ASCIIToUTF16("8889999"), |
374 "US")); | 374 "US")); |
375 | 375 |
376 // Different numbers don't match. | 376 // Different numbers don't match. |
377 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), | 377 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), |
378 ASCIIToUTF16("1415888"), | 378 ASCIIToUTF16("1415888"), |
379 "US")); | 379 "US")); |
380 } | 380 } |
OLD | NEW |