Index: chrome/test/data/android/payments/extra_shipping_options.js |
diff --git a/chrome/test/data/android/payments/free_shipping.js b/chrome/test/data/android/payments/extra_shipping_options.js |
similarity index 59% |
copy from chrome/test/data/android/payments/free_shipping.js |
copy to chrome/test/data/android/payments/extra_shipping_options.js |
index a3ec6d4f3094f2cbc4c9e566d17c5d087401c777..a3f6f01cacdfbe28e2b4815a5516a81b092e11fe 100644 |
--- a/chrome/test/data/android/payments/free_shipping.js |
+++ b/chrome/test/data/android/payments/extra_shipping_options.js |
@@ -5,11 +5,11 @@ |
*/ |
/* global PaymentRequest:false */ |
-/* global toDictionary:false */ |
/* global print:false */ |
/** |
- * Launches the PaymentRequest UI that offers free shipping worldwide. |
+ * Launches the PaymentRequest UI with shipping options, but does not request a |
+ * shipping address. |
*/ |
function buy() { // eslint-disable-line no-unused-vars |
try { |
@@ -22,24 +22,12 @@ function buy() { // eslint-disable-line no-unused-vars |
selected: true |
}] |
}; |
- var request = new PaymentRequest( |
- [{supportedMethods: ['visa']}], details, |
- {requestShipping: true}); |
- request.addEventListener('shippingaddresschange', function(e) { |
- e.updateWith(new Promise(function(resolve) { |
- // No changes in price based on shipping address change. |
- resolve(details); |
- })); |
- }); |
+ var request = new PaymentRequest([{supportedMethods: ['visa']}], details); |
request.show() |
.then(function(resp) { |
resp.complete('success') |
.then(function() { |
- print( |
- resp.shippingOption + '<br>' + |
- JSON.stringify( |
- toDictionary(resp.shippingAddress), undefined, 2) + |
- '<br>' + resp.methodName + '<br>' + |
+ print(resp.methodName + '<br>' + |
JSON.stringify(resp.details, undefined, 2)); |
}) |
.catch(function(error) { |