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

Side by Side Diff: chrome/test/data/android/payments/payment_request_free_shipping_test.html

Issue 1981903002: PaymentRequest: Rename 'currencyCode' to 'currency' in CurrencyAmount.idl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | chrome/test/data/android/payments/payment_request_no_shipping_test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Free Shipping Test</title> 4 <title>Free Shipping Test</title>
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scal e=1"> 6 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scal e=1">
7 <style> 7 <style>
8 button { 8 button {
9 width: 100%; 9 width: 100%;
10 height: 5em; 10 height: 5em;
(...skipping 24 matching lines...) Expand all
35 dict.recipient = addr.recipient; 35 dict.recipient = addr.recipient;
36 } 36 }
37 return dict; 37 return dict;
38 } 38 }
39 function buy() { 39 function buy() {
40 try { 40 try {
41 var request = new PaymentRequest(['visa'], { 41 var request = new PaymentRequest(['visa'], {
42 'items' : [ { 42 'items' : [ {
43 'id' : 'total', 43 'id' : 'total',
44 'label' : 'Total', 44 'label' : 'Total',
45 'amount' : {'currencyCode' : 'USD', 'value' : '5.00'} 45 'amount' : {'currency' : 'USD', 'value' : '5.00'}
46 } ], 46 } ],
47 'shippingOptions' : [ { 47 'shippingOptions' : [ {
48 'id' : 'freeShippingOption', 48 'id' : 'freeShippingOption',
49 'label' : 'Free global shipping', 49 'label' : 'Free global shipping',
50 'amount' : {'currencyCode' : 'USD', 'value' : '0'} 50 'amount' : {'currency' : 'USD', 'value' : '0'}
51 } ] 51 } ]
52 }, { 52 }, {
53 'requestShipping' : true 53 'requestShipping' : true
54 }); 54 });
55 request.show() 55 request.show()
56 .then(function(resp) { 56 .then(function(resp) {
57 resp.complete(true) 57 resp.complete(true)
58 .then(function() { 58 .then(function() {
59 print(request.shippingOption + '<br>' + 59 print(request.shippingOption + '<br>' +
60 JSON.stringify(toDictionary(request.shippingAddress), 60 JSON.stringify(toDictionary(request.shippingAddress),
61 undefined, 2) + 61 undefined, 2) +
62 '<br>' + resp.methodName + '<br>' + 62 '<br>' + resp.methodName + '<br>' +
63 JSON.stringify(resp.details, undefined, 2)); 63 JSON.stringify(resp.details, undefined, 2));
64 }) 64 })
65 .catch(function(error) { print(error.message); }); 65 .catch(function(error) { print(error.message); });
66 }) 66 })
67 .catch(function(error) { print(error.message); }); 67 .catch(function(error) { print(error.message); });
68 } catch (error) { 68 } catch (error) {
69 print(error.message); 69 print(error.message);
70 } 70 }
71 } 71 }
72 </script> 72 </script>
73 </body> 73 </body>
74 </html> 74 </html>
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/android/payments/payment_request_no_shipping_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698