OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachus
etts Institute of Technology, ERCIM, Keio University, Beihang). --> |
| 3 <meta charset="utf-8"> |
| 4 <title>Test for PaymentRequest identifier usage</title> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 <iframe id="iframe" allowpaymentrequest></iframe> |
| 8 <script> |
| 9 async_test((t) => { |
| 10 onload = t.step_func_done(() => { |
| 11 var request = new window[0].PaymentRequest([{supportedMethods: ['foo']}], {i
d: 'my_payment_id', total: {label: 'label', amount: {currency: 'USD', value: '5.
00'}}}); |
| 12 assert_equals(request.id, 'my_payment_id', 'Payment identifier is not reflec
ted correctly in PaymentRequest.id'); |
| 13 |
| 14 request = new window[0].PaymentRequest([{supportedMethods: ['foo']}], {total
: {label: 'label', amount: {currency: 'USD', value: '5.00'}}}); |
| 15 assert_equals(request.id.length, 36, 'Generated payment identifier is not of
correct length.'); |
| 16 }); |
| 17 }); |
| 18 </script> |
OLD | NEW |