| 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 "chrome/browser/autofill/autofill_common_test.h" |
| 8 #include "chrome/browser/autofill/credit_card.h" | 8 #include "chrome/browser/autofill/credit_card.h" |
| 9 #include "chrome/test/testing_browser_process_test.h" | 9 #include "chrome/test/base/testing_browser_process_test.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", |
| 19 "5610591081018250", | 19 "5610591081018250", |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 card.SetInfo(CREDIT_CARD_EXP_MONTH, ASCIIToUTF16("7")); | 175 card.SetInfo(CREDIT_CARD_EXP_MONTH, ASCIIToUTF16("7")); |
| 176 EXPECT_EQ(ASCIIToUTF16("07"), card.GetInfo(CREDIT_CARD_EXP_MONTH)); | 176 EXPECT_EQ(ASCIIToUTF16("07"), card.GetInfo(CREDIT_CARD_EXP_MONTH)); |
| 177 | 177 |
| 178 card.SetInfo(CREDIT_CARD_EXP_MONTH, ASCIIToUTF16("January")); | 178 card.SetInfo(CREDIT_CARD_EXP_MONTH, ASCIIToUTF16("January")); |
| 179 EXPECT_EQ(ASCIIToUTF16("01"), card.GetInfo(CREDIT_CARD_EXP_MONTH)); | 179 EXPECT_EQ(ASCIIToUTF16("01"), card.GetInfo(CREDIT_CARD_EXP_MONTH)); |
| 180 | 180 |
| 181 card.SetInfo(CREDIT_CARD_EXP_MONTH, ASCIIToUTF16("Apr")); | 181 card.SetInfo(CREDIT_CARD_EXP_MONTH, ASCIIToUTF16("Apr")); |
| 182 EXPECT_EQ(ASCIIToUTF16("04"), card.GetInfo(CREDIT_CARD_EXP_MONTH)); | 182 EXPECT_EQ(ASCIIToUTF16("04"), card.GetInfo(CREDIT_CARD_EXP_MONTH)); |
| 183 } | 183 } |
| OLD | NEW |