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

Side by Side Diff: content/test/data/payments/payment_app_invocation.html

Issue 2785523003: PaymentHandler: Rename PaymentAppManager to PaymentManager. (Closed)
Patch Set: PaymentHandler: Rename PaymentAppManager to PaymentManager. Created 3 years, 8 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 <title>Payment App: Test for invoking payment app</title> 2 <title>Payment App: Test for invoking payment app</title>
3 <script src="./result_queue.js"></script> 3 <script src="./result_queue.js"></script>
4 <script> 4 <script>
5 5
6 function registerPaymentApp() { 6 function registerPaymentApp() {
7 navigator.serviceWorker.register('payment_app.js', { scope: './' }) 7 navigator.serviceWorker.register('payment_app.js', { scope: './' })
8 .then(() => { 8 .then(() => {
9 return navigator.serviceWorker.ready; 9 return navigator.serviceWorker.ready;
10 }) 10 })
11 .then(registration => { 11 .then(registration => {
12 return registration.paymentAppManager.setManifest({ 12 return registration.paymentManager.setManifest({
13 name: 'Payment App', 13 name: 'Payment App',
14 icon: 'payment-app-icon', 14 icon: 'payment-app-icon',
15 options: [{ 15 options: [{
16 name: 'Visa ****', 16 name: 'Visa ****',
17 icon: 'payment-app-icon', 17 icon: 'payment-app-icon',
18 id: 'payment-app-id', 18 id: 'payment-app-id',
19 enabledMethods: ['visa'] 19 enabledMethods: ['visa']
20 }] 20 }]
21 }); 21 });
22 }) 22 })
23 .then(result => { 23 .then(result => {
24 sendResultToTest('registered'); 24 sendResultToTest('registered');
25 }) 25 })
26 .catch(result => { 26 .catch(result => {
27 sendResultToTest('error'); 27 sendResultToTest('error');
28 }); 28 });
29 } 29 }
30 30
31 var resultQueue = new ResultQueue(); 31 var resultQueue = new ResultQueue();
32 navigator.serviceWorker.addEventListener('message', e => { 32 navigator.serviceWorker.addEventListener('message', e => {
33 resultQueue.push(e.data); 33 resultQueue.push(e.data);
34 }); 34 });
35 35
36 </script> 36 </script>
OLDNEW
« no previous file with comments | « content/test/BUILD.gn ('k') | third_party/WebKit/LayoutTests/http/tests/payments/payment-app-interfaces.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698