Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: chrome/browser/autofill/wallet/full_wallet_unittest.cc

Issue 11777007: Adds wallet::RequiredAction for when we start interacting with Online Wallet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: class -> namespace Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/wallet/full_wallet_unittest.cc
diff --git a/chrome/browser/autofill/wallet/full_wallet_unittest.cc b/chrome/browser/autofill/wallet/full_wallet_unittest.cc
index 50d9354c9aa0ca4c2893a8dd894565ad2b7c90a5..3353b31b42d42c691618ceb915058da819fd2312 100644
--- a/chrome/browser/autofill/wallet/full_wallet_unittest.cc
+++ b/chrome/browser/autofill/wallet/full_wallet_unittest.cc
@@ -7,6 +7,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "chrome/browser/autofill/wallet/full_wallet.h"
+#include "chrome/browser/autofill/wallet/required_action.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -275,7 +276,14 @@ const char kFullWalletWithRequiredActions[] =
"{"
" \"required_action\":"
" ["
- " \"required_action\""
+ " \"UPGRADE_MIN_ADDRESS\","
+ " \"update_EXPIRATION_date\","
+ " \"INVALID_form_field\","
+ " \"cvc_risk_CHALLENGE\","
+ " \" setup_wallet\"," // Here and below don't apply to FullWallet.
+ " \"AcCePt_ToS \","
+ " \" \\tGAIA_auth \\n\\r\","
+ " \" 忍者の正体 \""
" ]"
"}";
@@ -373,8 +381,13 @@ TEST_F(FullWalletTest, CreateFullWalletMalformedBillingAddress) {
TEST_F(FullWalletTest, CreateFullWalletWithRequiredActions) {
SetUpDictionary(kFullWalletWithRequiredActions);
- std::vector<std::string> required_actions;
- required_actions.push_back("required_action");
+
+ std::vector<RequiredAction> required_actions;
+ required_actions.push_back(UPGRADE_MIN_ADDRESS);
+ required_actions.push_back(UPDATE_EXPIRATION_DATE);
+ required_actions.push_back(INVALID_FORM_FIELD);
+ required_actions.push_back(CVC_RISK_CHALLENGE);
+
FullWallet full_wallet(-1,
-1,
"",
@@ -405,7 +418,7 @@ TEST_F(FullWalletTest, CreateFullWallet) {
"ship_postal_code_number",
"ship_phone_number",
"ship_id"));
- std::vector<std::string> required_actions;
+ std::vector<RequiredAction> required_actions;
FullWallet full_wallet(12,
2012,
"iin",

Powered by Google App Engine
This is Rietveld 408576698