Chromium Code Reviews| Index: chrome/test/data/android/payments/payment_request_need_address_test.html |
| diff --git a/chrome/test/data/android/payments/payment_request_free_shipping_test.html b/chrome/test/data/android/payments/payment_request_need_address_test.html |
| similarity index 63% |
| copy from chrome/test/data/android/payments/payment_request_free_shipping_test.html |
| copy to chrome/test/data/android/payments/payment_request_need_address_test.html |
| index fb93a823b3d9ec53f9546dfb7f297715a5a186e3..17b28397b6b5ab99edc503d11cfdcbedf4d85239 100644 |
| --- a/chrome/test/data/android/payments/payment_request_free_shipping_test.html |
| +++ b/chrome/test/data/android/payments/payment_request_need_address_test.html |
| @@ -1,7 +1,7 @@ |
| <!DOCTYPE html> |
| <html> |
| <head> |
| -<title>Free Shipping Test</title> |
| +<title>Need Address Test</title> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <style> |
| @@ -13,7 +13,7 @@ button { |
| </style> |
| </head> |
| <body> |
| -<button onclick="buy()" id="buy">Buy</button> |
| +<button onclick="buy()" id="buy">Need Address Test</button> |
| <script> |
| function print(msg) { |
| document.open(); |
| @@ -41,14 +41,37 @@ function buy() { |
| 'id' : 'total', |
| 'label' : 'Total', |
| 'amount' : {'currencyCode' : 'USD', 'value' : '5.00'} |
| - } ], |
| - 'shippingOptions' : [ { |
| - 'id' : 'freeShippingOption', |
| - 'label' : 'Free global shipping', |
| - 'amount' : {'currencyCode' : 'USD', 'value' : '0'} |
| } ] |
| }, |
| {'requestShipping' : true}); |
|
gone
2016/05/04 02:01:03
nit: indentation looks weird here
please use gerrit instead
2016/05/05 04:57:48
Removed integration tests from this patch.
|
| + request.addEventListener("shippingaddresschange", function(e) { |
| + e.updateWith(new Promise(function(resolve, reject) { |
| + resolve({ |
| + 'items' : [ |
| + { |
| + 'id' : 'item', |
| + 'label' : 'Item', |
| + 'amount' : {'currencyCode' : 'USD', 'value' : '5.00'} |
| + }, |
| + { |
| + 'id' : 'shipping', |
| + 'label' : 'Standard shipping', |
| + 'amount' : {'currencyCode' : 'USD', 'value' : '1.00'} |
| + }, |
| + { |
| + 'id' : 'total', |
| + 'label' : 'Total', |
| + 'amount' : {'currencyCode' : 'USD', 'value' : '6.00'} |
| + }, |
| + ], |
| + 'shippingOptions' : [ { |
| + 'id' : 'calculatedShippingOption', |
| + 'label' : 'Standard shipping', |
| + 'amount' : {'currencyCode' : 'USD', 'value' : '1.00'} |
| + } ] |
| + }); |
| + })); |
| + }); |
| request.show() |
| .then(function(resp) { |
| resp.complete(true) |