| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script src="../resources/mojo-helpers.js"></script> | 4 <script src="../resources/mojo-helpers.js"></script> |
| 5 <script src="resources/payment-request-mock.js"></script> | 5 <script src="resources/payment-request-mock.js"></script> |
| 6 <script> | 6 <script> |
| 7 var details = { | 7 var details = { |
| 8 displayItems: [ | 8 total: |
| 9 { | 9 { |
| 10 label: 'Sub-total', | 10 label: 'Total', |
| 11 amount: { currency: 'USD', value : '55.00' }, // US$55.00 | 11 amount: {currency: 'USD', value: '55.00'}, // US$55.00 |
| 12 }, | |
| 13 { | |
| 14 label: 'Sales Tax', | |
| 15 amount: { currency: 'USD', value : '5.00' }, // US$5.00 | |
| 16 } | 12 } |
| 17 ] | |
| 18 }; | 13 }; |
| 19 | 14 |
| 20 var response_data = { | 15 var response_data = { |
| 21 method_name: 'visa', | 16 method_name: 'visa', |
| 22 stringified_details: '{}' | 17 stringified_details: '{}' |
| 23 }; | 18 }; |
| 24 | 19 |
| 25 promise_test(t => { | 20 promise_test(t => { |
| 26 var mock; | 21 var mock; |
| 27 var completeResult; | 22 var completeResult; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 38 // Return before calling gc() to make sure reference to response | 33 // Return before calling gc() to make sure reference to response |
| 39 // is gone. | 34 // is gone. |
| 40 }) | 35 }) |
| 41 .then(() => { | 36 .then(() => { |
| 42 gc(); | 37 gc(); |
| 43 mock.onComplete(); | 38 mock.onComplete(); |
| 44 return completeResult; | 39 return completeResult; |
| 45 }); | 40 }); |
| 46 }, 'Promises resolve even without references to request or response.'); | 41 }, 'Promises resolve even without references to request or response.'); |
| 47 </script> | 42 </script> |
| OLD | NEW |