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

Side by Side Diff: third_party/WebKit/LayoutTests/payments/promises-keep-request-alive.html

Issue 2054823002: PaymentRequest: complete() method should take PaymentComplete enum value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
OLDNEW
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 total: 8 total:
9 { 9 {
10 label: 'Total', 10 label: 'Total',
(...skipping 12 matching lines...) Expand all
23 var completeResult; 23 var completeResult;
24 return paymentRequestMock 24 return paymentRequestMock
25 .then(m => { 25 .then(m => {
26 mock = m; 26 mock = m;
27 var result = new PaymentRequest([{'supportedMethods': ['visa']}], deta ils).show(); 27 var result = new PaymentRequest([{'supportedMethods': ['visa']}], deta ils).show();
28 gc(); 28 gc();
29 mock.onPaymentResponse(response_data); 29 mock.onPaymentResponse(response_data);
30 return result; 30 return result;
31 }) 31 })
32 .then(response => { 32 .then(response => {
33 completeResult = response.complete(true); 33 completeResult = response.complete("success");
34 // Return before calling gc() to make sure reference to response 34 // Return before calling gc() to make sure reference to response
35 // is gone. 35 // is gone.
36 }) 36 })
37 .then(() => { 37 .then(() => {
38 gc(); 38 gc();
39 mock.onComplete(); 39 mock.onComplete();
40 return completeResult; 40 return completeResult;
41 }); 41 });
42 }, 'Promises resolve even without references to request or response.'); 42 }, 'Promises resolve even without references to request or response.');
43 </script> 43 </script>
OLDNEW
« no previous file with comments | « chrome/test/data/android/payments/no_shipping.js ('k') | third_party/WebKit/Source/modules/payments/PaymentCompleter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698