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

Unified Diff: components/payments/content/payment_request_state_unittest.cc

Issue 2741343011: [Payments] Move PersonalDataManager and locale to PaymentRequestState (Closed)
Patch Set: Initial Created 3 years, 9 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
« no previous file with comments | « components/payments/content/payment_request_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/payment_request_state_unittest.cc
diff --git a/components/payments/content/payment_request_state_unittest.cc b/components/payments/content/payment_request_state_unittest.cc
index 2af1af0468ac6ee782686858dca9dab32add59cd..be56d1fcf6b4f69efb0168840e41122c38e8ba6a 100644
--- a/components/payments/content/payment_request_state_unittest.cc
+++ b/components/payments/content/payment_request_state_unittest.cc
@@ -23,7 +23,6 @@ class PaymentRequestStateTest : public testing::Test,
protected:
PaymentRequestStateTest()
: num_on_selected_information_changed_called_(0),
- locale_("en-US"),
address_(autofill::test::GetFullProfile()),
credit_card_(autofill::test::GetCreditCard()) {
test_personal_data_manager_.AddTestingProfile(&address_);
@@ -38,10 +37,6 @@ class PaymentRequestStateTest : public testing::Test,
}
// PaymentRequestState::Delegate:
- const std::string& GetApplicationLocale() override { return locale_; };
- autofill::PersonalDataManager* GetPersonalDataManager() override {
- return &test_personal_data_manager_;
- }
void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override {
payment_response_ = std::move(response);
};
@@ -52,9 +47,10 @@ class PaymentRequestStateTest : public testing::Test,
std::vector<mojom::PaymentMethodDataPtr> method_data) {
// The spec will be based on the |options| and |details| passed in.
spec_ = base::MakeUnique<PaymentRequestSpec>(
- std::move(options), std::move(details), std::move(method_data),
- nullptr);
- state_ = base::MakeUnique<PaymentRequestState>(spec_.get(), this);
+ std::move(options), std::move(details), std::move(method_data), nullptr,
+ "en-US");
+ state_ = base::MakeUnique<PaymentRequestState>(
+ spec_.get(), this, "en-US", &test_personal_data_manager_);
state_->AddObserver(this);
}
@@ -96,7 +92,6 @@ class PaymentRequestStateTest : public testing::Test,
std::unique_ptr<PaymentRequestState> state_;
std::unique_ptr<PaymentRequestSpec> spec_;
int num_on_selected_information_changed_called_;
- std::string locale_;
mojom::PaymentResponsePtr payment_response_;
autofill::TestPersonalDataManager test_personal_data_manager_;
« no previous file with comments | « components/payments/content/payment_request_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698