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

Side by Side Diff: chrome/test/data/android/payments/dynamic_shipping.js

Issue 2072963002: Remove PaymentResponse.totalAmount according to latest spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final touch-up Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The Chromium Authors. All rights reserved. 2 * Copyright 2016 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* global PaymentRequest:false */ 7 /* global PaymentRequest:false */
8 /* global toDictionary:false */ 8 /* global toDictionary:false */
9 9
10 /** 10 /**
(...skipping 15 matching lines...) Expand all
26 evt.updateWith(new Promise(function(resolve) { 26 evt.updateWith(new Promise(function(resolve) {
27 resolve(updateDetails(details, request.shippingAddress)); 27 resolve(updateDetails(details, request.shippingAddress));
28 })); 28 }));
29 }); 29 });
30 30
31 request.show() 31 request.show()
32 .then(function(resp) { 32 .then(function(resp) {
33 resp.complete('success') 33 resp.complete('success')
34 .then(function() { 34 .then(function() {
35 print( 35 print(
36 JSON.stringify(resp.totalAmount, undefined, 2) + '<br>' +
37 resp.shippingOption + '<br>' + 36 resp.shippingOption + '<br>' +
38 JSON.stringify( 37 JSON.stringify(
39 toDictionary(resp.shippingAddress), undefined, 2) + 38 toDictionary(resp.shippingAddress), undefined, 2) +
40 '<br>' + resp.methodName + '<br>' + 39 '<br>' + resp.methodName + '<br>' +
41 JSON.stringify(resp.details, undefined, 2)); 40 JSON.stringify(resp.details, undefined, 2));
42 }) 41 })
43 .catch(function(error) { 42 .catch(function(error) {
44 print(error.message); 43 print(error.message);
45 }); 44 });
46 }) 45 })
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 details.displayItems.splice(0, 0, shippingOption); 80 details.displayItems.splice(0, 0, shippingOption);
82 } else { 81 } else {
83 details.displayItems.splice(0, 1, shippingOption); 82 details.displayItems.splice(0, 1, shippingOption);
84 } 83 }
85 details.shippingOptions = [shippingOption]; 84 details.shippingOptions = [shippingOption];
86 } else { 85 } else {
87 delete details.shippingOptions; 86 delete details.shippingOptions;
88 } 87 }
89 return details; 88 return details;
90 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698