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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-show-method.https.html

Issue 2864013002: Verify behavior of PaymentRequest.show() method, part 1. (Closed)
Patch Set: step-func Created 3 years, 7 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
« no previous file with comments | « components/payments/content/payment_request_web_contents_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 Constructor</title>
Marijn Kruisselbrink 2017/05/05 17:53:19 copy/past error?
please use gerrit instead 2017/05/05 18:16:33 Done.
5 <link rel="help" href="https://w3c.github.io/browser-payment-api/#show-method">
6 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script>
8 <script>
9 'use strict';
10
11 async_test(t => {
12 const request1 = new PaymentRequest([{
13 supportedMethods: ['basic-card'],
14 }], {
15 total: {
16 label: 'request1',
17 amount: {
18 currency: 'USD',
19 value: '1.00',
20 },
21 },
22 });
23 const request2 = new PaymentRequest([{
24 supportedMethods: ['basic-card'],
25 }], {
26 total: {
27 label: 'request2',
28 amount: {
29 currency: 'USD',
30 value: '1.00',
31 },
32 },
33 });
34 request1.show().catch(t.step_func_done());
35 request2.show().catch(t.step_func(e => {
Marijn Kruisselbrink 2017/05/05 17:53:19 you could rewrite this part as: promise_rejects(t,
please use gerrit instead 2017/05/05 18:16:33 Done.
36 assert_equals(Object.prototype.toString.call(e), '[object DOMException]');
37 assert_equals(e.name, 'AbortError');
38 request1.abort();
39 }));
40 }, 'If the user agent\'s "payment request is showing" boolean is true, ' +
41 'then return a promise rejected with an "AbortError" DOMException.');
42 </script>
OLDNEW
« no previous file with comments | « components/payments/content/payment_request_web_contents_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698