OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/utf_string_conversions.h" |
7 #include "chrome/browser/autofill/autofill_common_test.h" | 7 #include "components/autofill/browser/autofill_common_test.h" |
8 #include "chrome/browser/autofill/credit_card.h" | 8 #include "components/autofill/browser/credit_card.h" |
9 #include "components/autofill/common/form_field_data.h" | 9 #include "components/autofill/common/form_field_data.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // From https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card
_numbers.htm | 14 // From https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card
_numbers.htm |
15 const char* const kValidNumbers[] = { | 15 const char* const kValidNumbers[] = { |
16 "378282246310005", | 16 "378282246310005", |
17 "3714 4963 5398 431", | 17 "3714 4963 5398 431", |
18 "3787-3449-3671-000", | 18 "3787-3449-3671-000", |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 { | 351 { |
352 // Case insensitivity: | 352 // Case insensitivity: |
353 CreditCard credit_card; | 353 CreditCard credit_card; |
354 credit_card.SetRawInfo(CREDIT_CARD_NUMBER, | 354 credit_card.SetRawInfo(CREDIT_CARD_NUMBER, |
355 ASCIIToUTF16("6011111111111117")); | 355 ASCIIToUTF16("6011111111111117")); |
356 credit_card.FillSelectControl(CREDIT_CARD_TYPE, &field); | 356 credit_card.FillSelectControl(CREDIT_CARD_TYPE, &field); |
357 EXPECT_EQ(ASCIIToUTF16("discover"), field.value); | 357 EXPECT_EQ(ASCIIToUTF16("discover"), field.value); |
358 } | 358 } |
359 } | 359 } |
OLD | NEW |