Index: chrome/test/data/android/payments/email_and_phone.js |
diff --git a/chrome/test/data/android/payments/email_and_phone.js b/chrome/test/data/android/payments/email_and_phone.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bc76e72bd6e76a30d4cd3bc04ab34395769bf9a3 |
--- /dev/null |
+++ b/chrome/test/data/android/payments/email_and_phone.js |
@@ -0,0 +1,34 @@ |
+/* |
+ * Copyright 2016 The Chromium Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+/* global PaymentRequest:false */ |
+ |
+/* |
+ * Launches the PaymentRequest UI that requests email address and phone number. |
+ */ |
+function buy() { // eslint-disable-line no-unused-vars |
+ try { |
+ new PaymentRequest( |
+ [{supportedMethods: ['https://bobpay.com']}], |
+ {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}, |
+ {requestPayerEmail: true, requestPayerPhone: true}) |
+ .show() |
+ .then(function(resp) { |
+ resp.complete('success') |
+ .then(function() { |
+ print(JSON.stringify(resp, undefined, 2)); |
+ }) |
+ .catch(function(error) { |
+ print(error); |
+ }); |
+ }) |
+ .catch(function(error) { |
+ print(error); |
+ }); |
+ } catch (error) { |
+ print(error.message); |
+ } |
+} |