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/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/browser/autofill_common_test.h" | 8 #include "components/autofill/browser/autofill_common_test.h" |
9 #include "components/autofill/browser/credit_card.h" | 9 #include "components/autofill/browser/credit_card.h" |
10 #include "components/autofill/common/form_field_data.h" | 10 #include "components/autofill/shared/form_field_data.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace autofill { | 13 namespace autofill { |
14 namespace { | 14 namespace { |
15 | 15 |
16 // From https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card
_numbers.htm | 16 // From https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card
_numbers.htm |
17 const char* const kValidNumbers[] = { | 17 const char* const kValidNumbers[] = { |
18 "378282246310005", | 18 "378282246310005", |
19 "3714 4963 5398 431", | 19 "3714 4963 5398 431", |
20 "3787-3449-3671-000", | 20 "3787-3449-3671-000", |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 // Case insensitivity: | 392 // Case insensitivity: |
393 CreditCard credit_card(base::GenerateGUID(), "https://www.example.com/"); | 393 CreditCard credit_card(base::GenerateGUID(), "https://www.example.com/"); |
394 credit_card.SetRawInfo(CREDIT_CARD_NUMBER, | 394 credit_card.SetRawInfo(CREDIT_CARD_NUMBER, |
395 ASCIIToUTF16("6011111111111117")); | 395 ASCIIToUTF16("6011111111111117")); |
396 credit_card.FillSelectControl(CREDIT_CARD_TYPE, "en-US", &field); | 396 credit_card.FillSelectControl(CREDIT_CARD_TYPE, "en-US", &field); |
397 EXPECT_EQ(ASCIIToUTF16("discover"), field.value); | 397 EXPECT_EQ(ASCIIToUTF16("discover"), field.value); |
398 } | 398 } |
399 } | 399 } |
400 | 400 |
401 } // namespace autofill | 401 } // namespace autofill |
OLD | NEW |