| Index: chrome/test/data/android/payments/free_shipping.js
|
| diff --git a/chrome/test/data/android/payments/free_shipping.js b/chrome/test/data/android/payments/free_shipping.js
|
| index dab9949c1c36e4e52bb102e1cc229aafdb191873..a3ec6d4f3094f2cbc4c9e566d17c5d087401c777 100644
|
| --- a/chrome/test/data/android/payments/free_shipping.js
|
| +++ b/chrome/test/data/android/payments/free_shipping.js
|
| @@ -6,23 +6,31 @@
|
|
|
| /* global PaymentRequest:false */
|
| /* global toDictionary:false */
|
| +/* global print:false */
|
|
|
| /**
|
| * Launches the PaymentRequest UI that offers free shipping worldwide.
|
| */
|
| function buy() { // eslint-disable-line no-unused-vars
|
| try {
|
| + var details = {
|
| + total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
|
| + shippingOptions: [{
|
| + id: 'freeShippingOption',
|
| + label: 'Free global shipping',
|
| + amount: {currency: 'USD', value: '0'},
|
| + selected: true
|
| + }]
|
| + };
|
| var request = new PaymentRequest(
|
| - [{supportedMethods: ['visa']}], {
|
| - total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
|
| - shippingOptions: [{
|
| - id: 'freeShippingOption',
|
| - label: 'Free global shipping',
|
| - amount: {currency: 'USD', value: '0'},
|
| - selected: true
|
| - }]
|
| - },
|
| + [{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);
|
| + }));
|
| + });
|
| request.show()
|
| .then(function(resp) {
|
| resp.complete('success')
|
|
|