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

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: Test1 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 20 matching lines...) Expand all
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 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 }, function(error) {
please use gerrit instead 2016/07/18 17:55:59 Ditto
42 print(error);
41 }) 43 })
42 .catch(function(error) { 44 .catch(function(error) {
43 print(error.message); 45 print(error.message);
44 }); 46 });
47 }, function(error) {
please use gerrit instead 2016/07/18 17:55:58 Ditto
48 print(error);
45 }) 49 })
46 .catch(function(error) { 50 .catch(function(error) {
47 print(error.message); 51 print(error.message);
48 }); 52 });
49 } catch (error) { 53 } catch (error) {
50 print(error.message); 54 print(error.message);
51 } 55 }
52 } 56 }
53 57
54 /** 58 /**
(...skipping 25 matching lines...) Expand all
80 details.displayItems.splice(0, 0, shippingOption); 84 details.displayItems.splice(0, 0, shippingOption);
81 } else { 85 } else {
82 details.displayItems.splice(0, 1, shippingOption); 86 details.displayItems.splice(0, 1, shippingOption);
83 } 87 }
84 details.shippingOptions = [shippingOption]; 88 details.shippingOptions = [shippingOption];
85 } else { 89 } else {
86 delete details.shippingOptions; 90 delete details.shippingOptions;
87 } 91 }
88 return details; 92 return details;
89 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698