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

Unified Diff: ios/chrome/browser/ui/payments/contact_info_selection_mediator_unittest.mm

Issue 2970233002: [Payment Request] Adds a JourneyLogger instance to the PaymentRequest (Closed)
Patch Set: Addressed comments Created 3 years, 5 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: ios/chrome/browser/ui/payments/contact_info_selection_mediator_unittest.mm
diff --git a/ios/chrome/browser/ui/payments/contact_info_selection_mediator_unittest.mm b/ios/chrome/browser/ui/payments/contact_info_selection_mediator_unittest.mm
index de1506b20568bad0187e0b542dcf10dfbc9c1bb0..8105cfa7d349aec33856b1c695f3f7c673fa1fd1 100644
--- a/ios/chrome/browser/ui/payments/contact_info_selection_mediator_unittest.mm
+++ b/ios/chrome/browser/ui/payments/contact_info_selection_mediator_unittest.mm
@@ -10,10 +10,12 @@
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/test_personal_data_manager.h"
+#include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
#include "ios/chrome/browser/payments/payment_request_test_util.h"
#import "ios/chrome/browser/payments/payment_request_util.h"
#include "ios/chrome/browser/payments/test_payment_request.h"
#import "ios/chrome/browser/ui/payments/cells/autofill_profile_item.h"
+#import "ios/web/public/test/fakes/test_web_state.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "third_party/ocmock/gtest_support.h"
@@ -32,13 +34,15 @@ class PaymentRequestContactInfoSelectionMediatorTest : public PlatformTest {
protected:
PaymentRequestContactInfoSelectionMediatorTest()
: autofill_profile_1_(autofill::test::GetFullProfile()),
- autofill_profile_2_(autofill::test::GetFullProfile2()) {
+ autofill_profile_2_(autofill::test::GetFullProfile2()),
+ chrome_browser_state_(TestChromeBrowserState::Builder().Build()) {
// Add testing profiles to autofill::TestPersonalDataManager.
personal_data_manager_.AddTestingProfile(&autofill_profile_1_);
personal_data_manager_.AddTestingProfile(&autofill_profile_2_);
+
payment_request_ = base::MakeUnique<payments::TestPaymentRequest>(
payment_request_test_util::CreateTestWebPaymentRequest(),
- &personal_data_manager_);
+ chrome_browser_state_.get(), &web_state_, &personal_data_manager_);
// Override the selected contact profile.
payment_request_->set_selected_contact_profile(
payment_request_->contact_profiles()[1]);
@@ -57,7 +61,9 @@ class PaymentRequestContactInfoSelectionMediatorTest : public PlatformTest {
autofill::AutofillProfile autofill_profile_1_;
autofill::AutofillProfile autofill_profile_2_;
+ web::TestWebState web_state_;
autofill::TestPersonalDataManager personal_data_manager_;
+ std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
std::unique_ptr<payments::TestPaymentRequest> payment_request_;
};

Powered by Google App Engine
This is Rietveld 408576698