| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/autofill/validation.h" | 6 #include "components/autofill/browser/validation.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| 11 // From https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card
_numbers.htm | 11 // From https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card
_numbers.htm |
| 12 const char* const kValidNumbers[] = { | 12 const char* const kValidNumbers[] = { |
| 13 "378282246310005", | 13 "378282246310005", |
| 14 "3714 4963 5398 431", | 14 "3714 4963 5398 431", |
| 15 "3787-3449-3671-000", | 15 "3787-3449-3671-000", |
| 16 "5610591081018250", | 16 "5610591081018250", |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 autofill::IsValidEmailAddress(ASCIIToUTF16(kValidEmailAddress[i]))); | 92 autofill::IsValidEmailAddress(ASCIIToUTF16(kValidEmailAddress[i]))); |
| 93 } | 93 } |
| 94 for (size_t i = 0; i < arraysize(kInvalidEmailAddress); ++i) { | 94 for (size_t i = 0; i < arraysize(kInvalidEmailAddress); ++i) { |
| 95 SCOPED_TRACE(kInvalidEmailAddress[i]); | 95 SCOPED_TRACE(kInvalidEmailAddress[i]); |
| 96 EXPECT_FALSE( | 96 EXPECT_FALSE( |
| 97 autofill::IsValidEmailAddress(ASCIIToUTF16(kInvalidEmailAddress[i]))); | 97 autofill::IsValidEmailAddress(ASCIIToUTF16(kInvalidEmailAddress[i]))); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 | 101 |
| OLD | NEW |