OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/json/json_reader.h" | 5 #include "base/json/json_reader.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "components/autofill/content/browser/wallet/gaia_account.h" | 10 #include "components/autofill/content/browser/wallet/gaia_account.h" |
11 #include "components/autofill/content/browser/wallet/required_action.h" | 11 #include "components/autofill/content/browser/wallet/required_action.h" |
12 #include "components/autofill/content/browser/wallet/wallet_items.h" | 12 #include "components/autofill/content/browser/wallet/wallet_items.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
| 16 using base::ASCIIToUTF16; |
| 17 |
16 namespace { | 18 namespace { |
17 | 19 |
18 const char kMaskedInstrument[] = | 20 const char kMaskedInstrument[] = |
19 "{" | 21 "{" |
20 " \"descriptive_name\":\"descriptive_name\"," | 22 " \"descriptive_name\":\"descriptive_name\"," |
21 " \"type\":\"VISA\"," | 23 " \"type\":\"VISA\"," |
22 " \"supported_currency\":" | 24 " \"supported_currency\":" |
23 " [" | 25 " [" |
24 " \"currency\"" | 26 " \"currency\"" |
25 " ]," | 27 " ]," |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 ASCIIToUTF16("display_name"))); | 613 ASCIIToUTF16("display_name"))); |
612 expected.AddLegalDocument(legal_document.Pass()); | 614 expected.AddLegalDocument(legal_document.Pass()); |
613 expected.AddLegalDocument( | 615 expected.AddLegalDocument( |
614 WalletItems::LegalDocument::CreatePrivacyPolicyDocument()); | 616 WalletItems::LegalDocument::CreatePrivacyPolicyDocument()); |
615 | 617 |
616 EXPECT_EQ(expected, *WalletItems::CreateWalletItems(*dict)); | 618 EXPECT_EQ(expected, *WalletItems::CreateWalletItems(*dict)); |
617 } | 619 } |
618 | 620 |
619 } // namespace wallet | 621 } // namespace wallet |
620 } // namespace autofill | 622 } // namespace autofill |
OLD | NEW |