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

Unified Diff: chrome/browser/autofill/phone_number_i18n_unittest.cc

Issue 6930052: Revert 84320 - Autofill DOMUI Prefs should work with i18n phone numbers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/phone_number_i18n_unittest.cc
===================================================================
--- chrome/browser/autofill/phone_number_i18n_unittest.cc (revision 84345)
+++ chrome/browser/autofill/phone_number_i18n_unittest.cc (working copy)
@@ -1,44 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/utf_string_conversions.h"
-#include "chrome/browser/autofill/phone_number_i18n.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using namespace autofill_i18n;
-
-TEST(PhoneNumberI18NTest, PhoneNumbersMatch) {
- // Same numbers, defined country code.
- EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
- ASCIIToUTF16("4158889999"),
- "US"));
- // Same numbers, undefined country code.
- EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
- ASCIIToUTF16("4158889999"),
- ""));
-
- // Numbers differ by country code only.
- EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"),
- ASCIIToUTF16("4158889999"),
- "US"));
-
- // Same numbers, different formats.
- EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
- ASCIIToUTF16("415-888-9999"),
- "US"));
- EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
- ASCIIToUTF16("(415)888-9999"),
- "US"));
- EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
- ASCIIToUTF16("415 888 9999"),
- "US"));
- EXPECT_TRUE(PhoneNumbersMatch(ASCIIToUTF16("4158889999"),
- ASCIIToUTF16("415 TUV WXYZ"),
- "US"));
-
- // Partial matches don't count.
- EXPECT_FALSE(PhoneNumbersMatch(ASCIIToUTF16("14158889999"),
- ASCIIToUTF16("8889999"),
- "US"));
-}
« no previous file with comments | « chrome/browser/autofill/phone_number_i18n.cc ('k') | chrome/browser/resources/options/autofill_edit_address_overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698