Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |