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

Unified Diff: ios/chrome/browser/ui/payments/billing_address_selection_coordinator_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_coordinator_unittest.mm
diff --git a/ios/chrome/browser/ui/payments/billing_address_selection_coordinator_unittest.mm b/ios/chrome/browser/ui/payments/billing_address_selection_coordinator_unittest.mm
index d7fb8e700e5798679b29cabf04cb730cebb69f42..63238e4bd086e21d429e711afa2bcee5258bbc6a 100644
--- a/ios/chrome/browser/ui/payments/billing_address_selection_coordinator_unittest.mm
+++ b/ios/chrome/browser/ui/payments/billing_address_selection_coordinator_unittest.mm
@@ -15,9 +15,11 @@
#include "components/autofill/core/browser/test_personal_data_manager.h"
#include "components/autofill/core/browser/test_region_data_loader.h"
#include "components/prefs/pref_service.h"
+#include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
#include "ios/chrome/browser/payments/payment_request_test_util.h"
#include "ios/chrome/browser/payments/test_payment_request.h"
#import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller.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/OCMock/OCMock.h"
@@ -44,9 +46,13 @@ class PaymentRequestBillingAddressSelectionCoordinatorTest
autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER),
base::string16(), "en-US");
personal_data_manager_.AddTestingProfile(&autofill_profile2_);
+
+ 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_);
test_region_data_loader_.set_synchronous_callback(true);
payment_request_->SetRegionDataLoader(&test_region_data_loader_);
@@ -79,10 +85,12 @@ class PaymentRequestBillingAddressSelectionCoordinatorTest
autofill::AutofillProfile autofill_profile1_;
autofill::AutofillProfile autofill_profile2_;
+ web::TestWebState web_state_;
std::unique_ptr<PrefService> pref_service_;
autofill::TestPersonalDataManager personal_data_manager_;
autofill::TestRegionDataLoader test_region_data_loader_;
std::unique_ptr<payments::TestPaymentRequest> payment_request_;
+ std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
please use gerrit instead 2017/07/06 14:52:24 Ditto
Moe 2017/07/07 02:24:54 Done.
};
// Tests that invoking start and stop on the coordinator presents and dismisses

Powered by Google App Engine
This is Rietveld 408576698