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

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

Issue 2885793003: ** DO NOT COMMIT** Only for test
Patch Set: Replace yaho Created 3 years, 7 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_browsertest.cc
diff --git a/content/browser/payments/payment_app_browsertest.cc b/content/browser/payments/payment_app_browsertest.cc
index a174110033c65580ab1355b59124cb9f18d8f594..68e55112b0498162e4dffa57d615c4d04adedfac 100644
--- a/content/browser/payments/payment_app_browsertest.cc
+++ b/content/browser/payments/payment_app_browsertest.cc
@@ -21,6 +21,15 @@
namespace content {
namespace {
+using ::payments::mojom::PaymentAppRequest;
+using ::payments::mojom::PaymentAppRequestPtr;
+using ::payments::mojom::PaymentAppResponsePtr;
+using ::payments::mojom::PaymentCurrencyAmount;
+using ::payments::mojom::PaymentDetailsModifier;
+using ::payments::mojom::PaymentDetailsModifierPtr;
+using ::payments::mojom::PaymentItem;
+using ::payments::mojom::PaymentMethodData;
+
void GetAllPaymentAppsCallback(const base::Closure& done_callback,
PaymentAppProvider::PaymentApps* out_apps,
PaymentAppProvider::PaymentApps apps) {
@@ -104,6 +113,12 @@ class PaymentAppBrowserTest : public ContentBrowserTest {
app_request->total = payments::mojom::PaymentItem::New();
app_request->total->amount = payments::mojom::PaymentCurrencyAmount::New();
+ PaymentDetailsModifierPtr modifier = PaymentDetailsModifier::New();
+ modifier->total = payments::mojom::PaymentItem::New();
+ modifier->total->amount = payments::mojom::PaymentCurrencyAmount::New();
+ modifier->method_data = payments::mojom::PaymentMethodData::New();
+ app_request->modifiers.push_back(std::move(modifier));
+
base::RunLoop run_loop;
payments::mojom::PaymentAppResponsePtr response;
PaymentAppProvider::GetInstance()->InvokePaymentApp(
« no previous file with comments | « components/payments/mojom/payment_app.mojom ('k') | content/renderer/service_worker/service_worker_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698