OLD | NEW |
---|---|
(Empty) | |
1 /* | |
please use gerrit instead
2017/05/22 13:17:10
Let's not delete existing test cases.
wuandy1
2017/05/23 15:46:58
Done.
| |
2 * Copyright 2017 The Chromium Authors. All rights reserved. | |
3 * Use of this source code is governed by a BSD-style license that can be | |
4 * found in the LICENSE file. | |
5 */ | |
6 | |
7 /** | |
8 * Invokes the PaymentRequest with a modifier that contains the bare mininum of | |
9 * required fields. | |
10 */ | |
11 function buy() { // eslint-disable-line no-unused-vars | |
12 try { | |
13 new PaymentRequest( | |
14 [{ | |
15 supportedMethods: ['foo'], | |
16 }], { | |
17 total: { | |
18 label: 'Total', | |
19 amount: { | |
20 currency: 'USD', | |
21 value: '5.00', | |
22 }, | |
23 }, | |
24 modifiers: [{ | |
25 supportedMethods: ['foo'], | |
26 }], | |
27 }) | |
28 .show() | |
29 .then(function(response) { | |
30 response.complete() | |
31 .then(function() { | |
32 print(complete); | |
33 }) | |
34 .catch(function(error) { | |
35 print(error); | |
36 }); | |
37 }) | |
38 .catch(function(error) { | |
39 print(error); | |
40 }); | |
41 } catch (error) { | |
42 print(error.message); | |
43 } | |
44 } | |
OLD | NEW |