| Index: chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
|
| diff --git a/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc b/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
|
| index 968166c2a058aafb1b4fb887b3e3706c38d629fe..1ca549b221a8385d73ff644d72f9f74662d9978a 100644
|
| --- a/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
|
| +++ b/chrome/browser/ui/views/payments/payment_request_browsertest_base.cc
|
| @@ -52,7 +52,9 @@ PersonalDataLoadedObserverMock::~PersonalDataLoadedObserverMock() {}
|
|
|
| PaymentRequestBrowserTestBase::PaymentRequestBrowserTestBase(
|
| const std::string& test_file_path)
|
| - : test_file_path_(test_file_path), delegate_(nullptr) {}
|
| + : test_file_path_(test_file_path),
|
| + delegate_(nullptr),
|
| + incognito_for_testing_(false) {}
|
| PaymentRequestBrowserTestBase::~PaymentRequestBrowserTestBase() {}
|
|
|
| void PaymentRequestBrowserTestBase::SetUpCommandLine(
|
| @@ -85,6 +87,10 @@ void PaymentRequestBrowserTestBase::SetUpOnMainThread() {
|
| base::Unretained(this), web_contents));
|
| }
|
|
|
| +void PaymentRequestBrowserTestBase::SetIncognitoForTesting() {
|
| + incognito_for_testing_ = true;
|
| +}
|
| +
|
| void PaymentRequestBrowserTestBase::OnDialogOpened() {
|
| if (event_observer_)
|
| event_observer_->Observe(DialogEvent::DIALOG_OPENED);
|
| @@ -261,7 +267,8 @@ void PaymentRequestBrowserTestBase::CreatePaymentRequestForTest(
|
| DCHECK(web_contents);
|
| std::unique_ptr<TestChromePaymentRequestDelegate> delegate =
|
| base::MakeUnique<TestChromePaymentRequestDelegate>(
|
| - web_contents, this /* observer */, this /* widget_observer */);
|
| + web_contents, this /* observer */, this /* widget_observer */,
|
| + incognito_for_testing_);
|
| delegate_ = delegate.get();
|
| PaymentRequestWebContentsManager::GetOrCreateForWebContents(web_contents)
|
| ->CreatePaymentRequest(web_contents, std::move(delegate),
|
|
|