| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/guid.h" | 6 #include "base/guid.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "components/autofill/core/browser/autofill_common_test.h" | 8 #include "components/autofill/core/browser/autofill_test_utils.h" |
| 9 #include "components/autofill/core/browser/autofill_type.h" | 9 #include "components/autofill/core/browser/autofill_type.h" |
| 10 #include "components/autofill/core/browser/credit_card.h" | 10 #include "components/autofill/core/browser/credit_card.h" |
| 11 #include "components/autofill/core/browser/validation.h" | 11 #include "components/autofill/core/browser/validation.h" |
| 12 #include "components/autofill/core/common/form_field_data.h" | 12 #include "components/autofill/core/common/form_field_data.h" |
| 13 #include "grit/webkit_resources.h" | 13 #include "grit/webkit_resources.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 namespace autofill { | 16 namespace autofill { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 | 518 |
| 519 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { | 519 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { |
| 520 base::string16 card_number = ASCIIToUTF16(test_cases[i].card_number); | 520 base::string16 card_number = ASCIIToUTF16(test_cases[i].card_number); |
| 521 SCOPED_TRACE(card_number); | 521 SCOPED_TRACE(card_number); |
| 522 EXPECT_EQ(test_cases[i].type, CreditCard::GetCreditCardType(card_number)); | 522 EXPECT_EQ(test_cases[i].type, CreditCard::GetCreditCardType(card_number)); |
| 523 EXPECT_EQ(test_cases[i].is_valid, IsValidCreditCardNumber(card_number)); | 523 EXPECT_EQ(test_cases[i].is_valid, IsValidCreditCardNumber(card_number)); |
| 524 } | 524 } |
| 525 } | 525 } |
| 526 | 526 |
| 527 } // namespace autofill | 527 } // namespace autofill |
| OLD | NEW |