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

Unified Diff: content/browser/payments/payment_app_content_unittest_base.cc

Issue 2718013004: PaymentApp: Implement respondWith() in PaymentRequestEvent. (content side) (Closed)
Patch Set: rebase 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
Index: content/browser/payments/payment_app_content_unittest_base.cc
diff --git a/content/browser/payments/payment_app_content_unittest_base.cc b/content/browser/payments/payment_app_content_unittest_base.cc
index bb9766a1fd21c742aab7e07b8a152b502946bbc8..2295926fb96c6828569a4ac76410ca7e5d1976ed 100644
--- a/content/browser/payments/payment_app_content_unittest_base.cc
+++ b/content/browser/payments/payment_app_content_unittest_base.cc
@@ -47,7 +47,6 @@ class PaymentAppContentUnitTestBase::PaymentAppForWorkerTestHelper
public:
PaymentAppForWorkerTestHelper()
: EmbeddedWorkerTestHelper(base::FilePath()),
- was_dispatched_(false),
last_sw_registration_id_(kInvalidServiceWorkerRegistrationId) {}
~PaymentAppForWorkerTestHelper() override {}
@@ -69,15 +68,13 @@ class PaymentAppContentUnitTestBase::PaymentAppForWorkerTestHelper
void OnPaymentRequestEvent(
payments::mojom::PaymentAppRequestPtr app_request,
+ payments::mojom::PaymentAppResponseCallbackPtr response_callback,
const mojom::ServiceWorkerEventDispatcher::
DispatchPaymentRequestEventCallback& callback) override {
- ASSERT_FALSE(was_dispatched_);
- EmbeddedWorkerTestHelper::OnPaymentRequestEvent(std::move(app_request),
- callback);
- was_dispatched_ = true;
+ EmbeddedWorkerTestHelper::OnPaymentRequestEvent(
+ std::move(app_request), std::move(response_callback), callback);
}
- bool was_dispatched_;
int64_t last_sw_registration_id_;
GURL last_sw_scope_;
@@ -196,14 +193,6 @@ void PaymentAppContentUnitTestBase::UnregisterServiceWorker(
EXPECT_TRUE(called);
}
-void PaymentAppContentUnitTestBase::ResetPaymentAppInvoked() const {
- worker_helper_->was_dispatched_ = false;
-}
-
-bool PaymentAppContentUnitTestBase::payment_app_invoked() const {
- return worker_helper_->was_dispatched_;
-}
-
int64_t PaymentAppContentUnitTestBase::last_sw_registration_id() const {
return worker_helper_->last_sw_registration_id_;
}
« no previous file with comments | « content/browser/payments/payment_app_content_unittest_base.h ('k') | content/browser/payments/payment_app_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698