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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 (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 "components/autofill/browser/phone_number_i18n.h" 8 #include "components/autofill/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"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 TEST(PhoneNumberI18NTest, PhoneNumbersMatch) { 331 TEST(PhoneNumberI18NTest, PhoneNumbersMatch) {
332 // Same numbers, defined country code. 332 // Same numbers, defined country code.
333 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"), 333 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
334 ASCIIToUTF16("4158889999"), 334 ASCIIToUTF16("4158889999"),
335 "US", 335 "US",
336 "en-US")); 336 "en-US"));
337 // Same numbers, undefined country code. 337 // Same numbers, undefined country code.
338 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"), 338 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
339 ASCIIToUTF16("4158889999"), 339 ASCIIToUTF16("4158889999"),
340 "", 340 std::string(),
341 "en-US")); 341 "en-US"));
342 342
343 // Numbers differ by country code only. 343 // Numbers differ by country code only.
344 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), 344 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"),
345 ASCIIToUTF16("4158889999"), 345 ASCIIToUTF16("4158889999"),
346 "US", 346 "US",
347 "en-US")); 347 "en-US"));
348 348
349 // Same numbers, different formats. 349 // Same numbers, different formats.
350 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"), 350 EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
(...skipping 22 matching lines...) Expand all
373 ASCIIToUTF16("8889999"), 373 ASCIIToUTF16("8889999"),
374 "US", 374 "US",
375 "en-US")); 375 "en-US"));
376 376
377 // Different numbers don't match. 377 // Different numbers don't match.
378 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"), 378 EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"),
379 ASCIIToUTF16("1415888"), 379 ASCIIToUTF16("1415888"),
380 "US", 380 "US",
381 "en-US")); 381 "en-US"));
382 } 382 }
OLDNEW
« no previous file with comments | « chrome/utility/profile_import_handler.cc ('k') | components/autofill/browser/wallet/full_wallet_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698