OLD | NEW |
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/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
6 #include "base/time/time.h" | 6 #include "base/time/time.h" |
7 #include "components/autofill/core/browser/validation.h" | 7 #include "components/autofill/core/browser/validation.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
| 10 using base::ASCIIToUTF16; |
| 11 |
10 namespace autofill { | 12 namespace autofill { |
11 namespace { | 13 namespace { |
12 | 14 |
13 struct ExpirationDate { | 15 struct ExpirationDate { |
14 const char* year; | 16 const char* year; |
15 const char* month; | 17 const char* month; |
16 }; | 18 }; |
17 | 19 |
18 struct IntExpirationDate { | 20 struct IntExpirationDate { |
19 const int year; | 21 const int year; |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 ASCIIToUTF16(kVisaCVC), ASCIIToUTF16(kAmericanExpressCard))); | 192 ASCIIToUTF16(kVisaCVC), ASCIIToUTF16(kAmericanExpressCard))); |
191 EXPECT_FALSE(autofill::IsValidCreditCardSecurityCode( | 193 EXPECT_FALSE(autofill::IsValidCreditCardSecurityCode( |
192 ASCIIToUTF16(kAmericanExpressCVC), ASCIIToUTF16(kVisaCard))); | 194 ASCIIToUTF16(kAmericanExpressCVC), ASCIIToUTF16(kVisaCard))); |
193 EXPECT_TRUE(autofill::IsValidCreditCardSecurityCode( | 195 EXPECT_TRUE(autofill::IsValidCreditCardSecurityCode( |
194 ASCIIToUTF16(kVisaCVC), ASCIIToUTF16(kInvalidNumbers[0]))); | 196 ASCIIToUTF16(kVisaCVC), ASCIIToUTF16(kInvalidNumbers[0]))); |
195 EXPECT_FALSE(autofill::IsValidCreditCardSecurityCode( | 197 EXPECT_FALSE(autofill::IsValidCreditCardSecurityCode( |
196 ASCIIToUTF16(kAmericanExpressCVC), ASCIIToUTF16(kInvalidNumbers[0]))); | 198 ASCIIToUTF16(kAmericanExpressCVC), ASCIIToUTF16(kInvalidNumbers[0]))); |
197 } | 199 } |
198 | 200 |
199 } // namespace autofill | 201 } // namespace autofill |
OLD | NEW |