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.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 namespace autofill { | 10 namespace autofill { |
11 namespace { | 11 namespace { |
12 | 12 |
13 struct ExpirationDate { | 13 struct ExpirationDate { |
14 const char* year; | 14 const char* year; |
15 const char* month; | 15 const char* month; |
16 }; | 16 }; |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 ASCIIToUTF16(kVisaCVC), ASCIIToUTF16(kAmericanExpressCard))); | 187 ASCIIToUTF16(kVisaCVC), ASCIIToUTF16(kAmericanExpressCard))); |
188 EXPECT_FALSE(autofill::IsValidCreditCardSecurityCode( | 188 EXPECT_FALSE(autofill::IsValidCreditCardSecurityCode( |
189 ASCIIToUTF16(kAmericanExpressCVC), ASCIIToUTF16(kVisaCard))); | 189 ASCIIToUTF16(kAmericanExpressCVC), ASCIIToUTF16(kVisaCard))); |
190 EXPECT_TRUE(autofill::IsValidCreditCardSecurityCode( | 190 EXPECT_TRUE(autofill::IsValidCreditCardSecurityCode( |
191 ASCIIToUTF16(kVisaCVC), ASCIIToUTF16(kInvalidNumbers[0]))); | 191 ASCIIToUTF16(kVisaCVC), ASCIIToUTF16(kInvalidNumbers[0]))); |
192 EXPECT_FALSE(autofill::IsValidCreditCardSecurityCode( | 192 EXPECT_FALSE(autofill::IsValidCreditCardSecurityCode( |
193 ASCIIToUTF16(kAmericanExpressCVC), ASCIIToUTF16(kInvalidNumbers[0]))); | 193 ASCIIToUTF16(kAmericanExpressCVC), ASCIIToUTF16(kInvalidNumbers[0]))); |
194 } | 194 } |
195 | 195 |
196 } // namespace autofill | 196 } // namespace autofill |
OLD | NEW |