| OLD | NEW | 
|   1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |   1 // Copyright (c) 2010 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/basictypes.h" |   5 #include "base/basictypes.h" | 
 |   6 #include "base/utf_string_conversions.h" | 
|   6 #include "chrome/browser/autofill/autofill_common_unittest.h" |   7 #include "chrome/browser/autofill/autofill_common_unittest.h" | 
|   7 #include "chrome/browser/autofill/credit_card.h" |   8 #include "chrome/browser/autofill/credit_card.h" | 
|   8 #include "testing/gtest/include/gtest/gtest.h" |   9 #include "testing/gtest/include/gtest/gtest.h" | 
|   9  |  10  | 
|  10 namespace { |  11 namespace { | 
|  11  |  12  | 
|  12 // Tests credit card summary string generation.  This test simulates a variety |  13 // Tests credit card summary string generation.  This test simulates a variety | 
|  13 // of different possible summary strings.  Variations occur based on the |  14 // of different possible summary strings.  Variations occur based on the | 
|  14 // existence of credit card number, month, and year fields. |  15 // existence of credit card number, month, and year fields. | 
|  15 TEST(CreditCardTest, PreviewSummaryAndObfuscatedNumberStrings) { |  16 TEST(CreditCardTest, PreviewSummaryAndObfuscatedNumberStrings) { | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  61   autofill_unittest::SetCreditCardInfo(&credit_card4, "Corporate", |  62   autofill_unittest::SetCreditCardInfo(&credit_card4, "Corporate", | 
|  62       "John Dillinger", "Visa", "123456789012", "01", "2010", "Chicago"); |  63       "John Dillinger", "Visa", "123456789012", "01", "2010", "Chicago"); | 
|  63   string16 summary4 = credit_card4.PreviewSummary(); |  64   string16 summary4 = credit_card4.PreviewSummary(); | 
|  64   EXPECT_EQ(string16(ASCIIToUTF16("************9012, Exp: 01/2010")), summary4); |  65   EXPECT_EQ(string16(ASCIIToUTF16("************9012, Exp: 01/2010")), summary4); | 
|  65   string16 obfuscated4 = credit_card4.ObfuscatedNumber(); |  66   string16 obfuscated4 = credit_card4.ObfuscatedNumber(); | 
|  66   EXPECT_EQ(string16(ASCIIToUTF16("************9012")), obfuscated4); |  67   EXPECT_EQ(string16(ASCIIToUTF16("************9012")), obfuscated4); | 
|  67 } |  68 } | 
|  68  |  69  | 
|  69 }  // namespace |  70 }  // namespace | 
|  70  |  71  | 
| OLD | NEW |