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

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

Issue 2970233002: [Payment Request] Adds a JourneyLogger instance to the PaymentRequest (Closed)
Patch Set: Initial 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/billing_address_selection_mediator_unittest.mm
diff --git a/ios/chrome/browser/ui/payments/billing_address_selection_mediator_unittest.mm b/ios/chrome/browser/ui/payments/billing_address_selection_mediator_unittest.mm
index 988a417926b27752769f8005456516cbe15eb8f5..a21499d2cde8f6ff7f0e808a76b2191e7543974d 100644
--- a/ios/chrome/browser/ui/payments/billing_address_selection_mediator_unittest.mm
+++ b/ios/chrome/browser/ui/payments/billing_address_selection_mediator_unittest.mm
@@ -12,10 +12,12 @@
#include "components/autofill/core/browser/test_personal_data_manager.h"
#include "components/payments/core/payments_profile_comparator.h"
#include "ios/chrome/browser/application_context.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"
@@ -51,9 +53,13 @@ class PaymentRequestBillingAddressSelectionMediatorTest : public PlatformTest {
personal_data_manager_.AddTestingProfile(&autofill_profile_2_);
personal_data_manager_.AddTestingProfile(&autofill_profile_3_);
personal_data_manager_.AddTestingProfile(&autofill_profile_4_);
+
+ TestChromeBrowserState::Builder test_cbs_builder;
+ chrome_browser_state_ = test_cbs_builder.Build();
+
payment_request_ = base::MakeUnique<payments::TestPaymentRequest>(
payment_request_test_util::CreateTestWebPaymentRequest(),
- &personal_data_manager_);
+ chrome_browser_state_.get(), &web_state_, &personal_data_manager_);
profile_comparator_ = base::MakeUnique<FakePaymentsProfileComparator>(
GetApplicationContext()->GetApplicationLocale(),
*payment_request_.get());
@@ -76,9 +82,11 @@ class PaymentRequestBillingAddressSelectionMediatorTest : public PlatformTest {
autofill::AutofillProfile autofill_profile_2_;
autofill::AutofillProfile autofill_profile_3_;
autofill::AutofillProfile autofill_profile_4_;
+ web::TestWebState web_state_;
autofill::TestPersonalDataManager personal_data_manager_;
std::unique_ptr<payments::TestPaymentRequest> payment_request_;
std::unique_ptr<FakePaymentsProfileComparator> profile_comparator_;
+ std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
};
// Tests that the expected selectable items are created and that the index of

Powered by Google App Engine
This is Rietveld 408576698