| Index: components/autofill/content/browser/wallet/instrument_unittest.cc
|
| diff --git a/components/autofill/content/browser/wallet/instrument_unittest.cc b/components/autofill/content/browser/wallet/instrument_unittest.cc
|
| index f4b9ee8ccd1eb76746eaaa22881055d512711cd4..b5f273f87fecbd2a9b1dacc26478742da8c48ecc 100644
|
| --- a/components/autofill/content/browser/wallet/instrument_unittest.cc
|
| +++ b/components/autofill/content/browser/wallet/instrument_unittest.cc
|
| @@ -29,128 +29,6 @@ TEST(Instrument, LastFourDigits) {
|
| GetTestShippingAddress().Pass());
|
|
|
| EXPECT_EQ(ASCIIToUTF16(kLastFourDigits), instrument.last_four_digits());
|
| - EXPECT_TRUE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, NoPrimaryAccountNumberIsInvalid) {
|
| - Instrument instrument(base::string16(),
|
| - ASCIIToUTF16(kCardVerificationNumber),
|
| - 12,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, TooShortPrimaryAccountNumberIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16("44447"),
|
| - ASCIIToUTF16(kCardVerificationNumber),
|
| - 12,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, TooLongPrimaryAccountNumberIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16("44444444444444444448"),
|
| - ASCIIToUTF16(kCardVerificationNumber),
|
| - 12,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, PrimaryAccountNumberNotPassingLuhnIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16("4444444444444444"),
|
| - ASCIIToUTF16(kCardVerificationNumber),
|
| - 12,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, NoCardVerificationNumberIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
|
| - base::string16(),
|
| - 12,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, TooShortCardVerificationNumberIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
|
| - ASCIIToUTF16("12"),
|
| - 12,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, TooLongCardVerificationNumberIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
|
| - ASCIIToUTF16("12345"),
|
| - 12,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, ZeroAsExpirationMonthIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
|
| - ASCIIToUTF16(kCardVerificationNumber),
|
| - 0,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, TooLargeExpirationMonthIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
|
| - ASCIIToUTF16(kCardVerificationNumber),
|
| - 13,
|
| - 2015,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, TooSmallExpirationYearIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
|
| - ASCIIToUTF16(kCardVerificationNumber),
|
| - 12,
|
| - 999,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| -}
|
| -
|
| -TEST(Instrument, TooLargeExpirationYearIsInvalid) {
|
| - Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
|
| - ASCIIToUTF16(kCardVerificationNumber),
|
| - 12,
|
| - 10000,
|
| - Instrument::VISA,
|
| - GetTestShippingAddress().Pass());
|
| -
|
| - EXPECT_FALSE(instrument.IsValid());
|
| }
|
|
|
| TEST(Instrument, ToDictionary) {
|
|
|