summaryrefslogtreecommitdiffstats
path: root/chromium/components/autofill/content/browser/wallet/instrument_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/autofill/content/browser/wallet/instrument_unittest.cc')
-rw-r--r--chromium/components/autofill/content/browser/wallet/instrument_unittest.cc66
1 files changed, 0 insertions, 66 deletions
diff --git a/chromium/components/autofill/content/browser/wallet/instrument_unittest.cc b/chromium/components/autofill/content/browser/wallet/instrument_unittest.cc
deleted file mode 100644
index b5f273f87fe..00000000000
--- a/chromium/components/autofill/content/browser/wallet/instrument_unittest.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/strings/utf_string_conversions.h"
-#include "base/values.h"
-#include "components/autofill/content/browser/wallet/instrument.h"
-#include "components/autofill/content/browser/wallet/wallet_address.h"
-#include "components/autofill/content/browser/wallet/wallet_test_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-const char kPrimaryAccountNumber[] = "4444444444444448";
-const char kCardVerificationNumber[] = "123";
-const char kLastFourDigits[] = "4448";
-
-}
-
-namespace autofill {
-namespace wallet {
-
-TEST(Instrument, LastFourDigits) {
- Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
- ASCIIToUTF16(kCardVerificationNumber),
- 12,
- 2015,
- Instrument::VISA,
- GetTestShippingAddress().Pass());
-
- EXPECT_EQ(ASCIIToUTF16(kLastFourDigits), instrument.last_four_digits());
-}
-
-TEST(Instrument, ToDictionary) {
- base::DictionaryValue expected;
- expected.SetString("type", "CREDIT_CARD");
- expected.SetInteger("credit_card.exp_month", 12);
- expected.SetInteger("credit_card.exp_year", 2015);
- expected.SetString("credit_card.last_4_digits", kLastFourDigits);
- expected.SetString("credit_card.fop_type", "VISA");
- expected.SetString("credit_card.address.country_name_code", "US");
- expected.SetString("credit_card.address.recipient_name",
- "ship_recipient_name");
- expected.SetString("credit_card.address.locality_name",
- "ship_locality_name");
- expected.SetString("credit_card.address.administrative_area_name",
- "ship_admin_area_name");
- expected.SetString("credit_card.address.postal_code_number",
- "ship_postal_code_number");
- base::ListValue* address_lines = new base::ListValue();
- address_lines->AppendString("ship_address_line_1");
- address_lines->AppendString("ship_address_line_2");
- expected.Set("credit_card.address.address_line", address_lines);
-
- Instrument instrument(ASCIIToUTF16(kPrimaryAccountNumber),
- ASCIIToUTF16(kCardVerificationNumber),
- 12,
- 2015,
- Instrument::VISA,
- GetTestShippingAddress().Pass());
-
- EXPECT_TRUE(expected.Equals(instrument.ToDictionary().get()));
-}
-
-} // namespace wallet
-} // namespace autofill