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

Side by Side Diff: components/autofill/core/browser/phone_number_i18n_unittest.cc

Issue 190213003: Eliminate BrowserThread dependency from WebDataAutofillServiceTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
10 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/libphonenumber/src/phonenumber_api.h" 10 #include "third_party/libphonenumber/src/phonenumber_api.h"
12 11
13 using base::ASCIIToUTF16; 12 using base::ASCIIToUTF16;
14 using base::UTF8ToUTF16; 13 using base::UTF8ToUTF16;
15 using content::BrowserThread;
16 14
17 namespace autofill { 15 namespace autofill {
18 16
19 using i18n::NormalizePhoneNumber; 17 using i18n::NormalizePhoneNumber;
20 using i18n::ParsePhoneNumber; 18 using i18n::ParsePhoneNumber;
21 using i18n::ConstructPhoneNumber; 19 using i18n::ConstructPhoneNumber;
22 using i18n::PhoneNumbersMatch; 20 using i18n::PhoneNumbersMatch;
23 21
24 TEST(PhoneNumberI18NTest, NormalizePhoneNumber) { 22 TEST(PhoneNumberI18NTest, NormalizePhoneNumber) {
25 // "Large" digits. 23 // "Large" digits.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 "en-US")); 380 "en-US"));
383 381
384 // Different numbers don't match. 382 // Different numbers don't match.
385 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), 383 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"),
386 ASCIIToUTF16("1415888"), 384 ASCIIToUTF16("1415888"),
387 "US", 385 "US",
388 "en-US")); 386 "en-US"));
389 } 387 }
390 388
391 } // namespace autofill 389 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698