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/core/common/form_field_data.h" |
11 #include "grit/webkit_resources.h" | 11 #include "grit/webkit_resources.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace autofill { | 14 namespace autofill { |
15 namespace { | 15 namespace { |
16 | 16 |
17 // From https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card
_numbers.htm | 17 // From https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card
_numbers.htm |
18 const char* const kValidNumbers[] = { | 18 const char* const kValidNumbers[] = { |
19 "378282246310005", | 19 "378282246310005", |
20 "3714 4963 5398 431", | 20 "3714 4963 5398 431", |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // Case insensitivity: | 482 // Case insensitivity: |
483 CreditCard credit_card(base::GenerateGUID(), "https://www.example.com/"); | 483 CreditCard credit_card(base::GenerateGUID(), "https://www.example.com/"); |
484 credit_card.SetRawInfo(CREDIT_CARD_NUMBER, | 484 credit_card.SetRawInfo(CREDIT_CARD_NUMBER, |
485 ASCIIToUTF16("6011111111111117")); | 485 ASCIIToUTF16("6011111111111117")); |
486 credit_card.FillSelectControl(CREDIT_CARD_TYPE, "en-US", &field); | 486 credit_card.FillSelectControl(CREDIT_CARD_TYPE, "en-US", &field); |
487 EXPECT_EQ(ASCIIToUTF16("discover"), field.value); | 487 EXPECT_EQ(ASCIIToUTF16("discover"), field.value); |
488 } | 488 } |
489 } | 489 } |
490 | 490 |
491 } // namespace autofill | 491 } // namespace autofill |
OLD | NEW |