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

Unified Diff: content/test/data/payments/payment_app_invocation.html

Issue 2646313002: PaymentApp: Implement invokePaymentApp() in renderer side. (Closed)
Patch Set: address comments Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/data/payments/payment_app.js ('k') | content/test/data/payments/payment_app_window.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/payments/payment_app_invocation.html
diff --git a/content/test/data/payments/payment_app_invocation.html b/content/test/data/payments/payment_app_invocation.html
new file mode 100644
index 0000000000000000000000000000000000000000..672992b46ac0426597e19f91a174de43f0631163
--- /dev/null
+++ b/content/test/data/payments/payment_app_invocation.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<title>Payment App: Test for invoking payment app</title>
+<script src="./result_queue.js"></script>
+<script>
+
+function registerPaymentApp() {
+ navigator.serviceWorker.register('payment_app.js', { scope: './' })
+ .then(() => {
+ return navigator.serviceWorker.ready;
+ })
+ .then(registration => {
+ return registration.paymentAppManager.setManifest({
+ name: 'Payment App',
+ icon: 'payment-app-icon',
+ options: [{
+ name: 'Visa ****',
+ icon: 'payment-app-icon',
+ id: 'payment-app-id',
+ enabledMethods: ['visa']
+ }]
+ });
+ })
+ .then(result => {
+ sendResultToTest('registered');
+ })
+ .catch(result => {
+ sendResultToTest('error');
+ });
+}
+
+var resultQueue = new ResultQueue();
+navigator.serviceWorker.addEventListener('message', e => {
+ resultQueue.push(e.data);
+});
+
+</script>
« no previous file with comments | « content/test/data/payments/payment_app.js ('k') | content/test/data/payments/payment_app_window.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698