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

Unified Diff: chrome/test/data/android/payments/extra_shipping_options.js

Issue 2439543002: Ignore shipping options if requestShipping=false (Closed)
Patch Set: Test owners file points to production code owners file Created 4 years, 2 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: 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) {

Powered by Google App Engine
This is Rietveld 408576698