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

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

Issue 2145553002: Parameterize OnError method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing integration test failures Created 4 years, 5 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 22 matching lines...) Expand all
33 resp.complete('success') 33 resp.complete('success')
34 .then(function() { 34 .then(function() {
35 print( 35 print(
36 resp.shippingOption + '<br>' + 36 resp.shippingOption + '<br>' +
37 JSON.stringify( 37 JSON.stringify(
38 toDictionary(resp.shippingAddress), undefined, 2) + 38 toDictionary(resp.shippingAddress), undefined, 2) +
39 '<br>' + resp.methodName + '<br>' + 39 '<br>' + resp.methodName + '<br>' +
40 JSON.stringify(resp.details, undefined, 2)); 40 JSON.stringify(resp.details, undefined, 2));
41 }) 41 })
42 .catch(function(error) { 42 .catch(function(error) {
43 print(error.message); 43 print(error);
44 }); 44 });
45 }) 45 })
46 .catch(function(error) { 46 .catch(function(error) {
47 print(error.message); 47 print(error);
48 }); 48 });
49 } catch (error) { 49 } catch (error) {
50 print(error.message); 50 print(error.message);
51 } 51 }
52 } 52 }
53 53
54 /** 54 /**
55 * Updates the shopping cart with the appropriate shipping prices according to 55 * Updates the shopping cart with the appropriate shipping prices according to
56 * the shipping address. 56 * the shipping address.
57 * @param {object} details - The shopping cart. 57 * @param {object} details - The shopping cart.
(...skipping 22 matching lines...) Expand all
80 details.displayItems.splice(0, 0, shippingOption); 80 details.displayItems.splice(0, 0, shippingOption);
81 } else { 81 } else {
82 details.displayItems.splice(0, 1, shippingOption); 82 details.displayItems.splice(0, 1, shippingOption);
83 } 83 }
84 details.shippingOptions = [shippingOption]; 84 details.shippingOptions = [shippingOption];
85 } else { 85 } else {
86 delete details.shippingOptions; 86 delete details.shippingOptions;
87 } 87 }
88 return details; 88 return details;
89 } 89 }
OLDNEW
« no previous file with comments | « chrome/test/data/android/payments/contact_details.js ('k') | chrome/test/data/android/payments/email.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698