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

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

Issue 2958333002: [Payments] Implement web payment app manifest (Closed)
Patch Set: rename and comments Created 3 years, 5 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 <head>
4 <link rel="manifest" href="manifest.json">
5 </head>
3 <script src="./result_queue.js"></script> 6 <script src="./result_queue.js"></script>
4 <script> 7 <script>
5 8
6 function registerPaymentApp() { 9 function registerPaymentApp() {
7 navigator.serviceWorker.register('payment_app.js', { scope: './' }) 10 navigator.serviceWorker.register('payment_app.js', { scope: './' })
8 .then(() => { 11 .then(() => {
9 return navigator.serviceWorker.ready; 12 return navigator.serviceWorker.ready;
10 }) 13 })
11 .then(registration => { 14 .then(registration => {
12 const instrumentPromises = [ 15 const instrumentPromises = [
(...skipping 21 matching lines...) Expand all
34 sendResultToTest('error'); 37 sendResultToTest('error');
35 }); 38 });
36 } 39 }
37 40
38 var resultQueue = new ResultQueue(); 41 var resultQueue = new ResultQueue();
39 navigator.serviceWorker.addEventListener('message', e => { 42 navigator.serviceWorker.addEventListener('message', e => {
40 resultQueue.push(e.data); 43 resultQueue.push(e.data);
41 }); 44 });
42 45
43 </script> 46 </script>
OLDNEW
« no previous file with comments | « content/test/data/payments/manifest.json ('k') | third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698