Index: content/test/data/payments/payment_app.js |
diff --git a/content/test/data/payments/payment_app.js b/content/test/data/payments/payment_app.js |
index ce0246420a7d16d230adb2c358fdc5a69ff162b9..f6b2d38b3b58a6d59de45e71dc583df7eba156de 100644 |
--- a/content/test/data/payments/payment_app.js |
+++ b/content/test/data/payments/payment_app.js |
@@ -3,6 +3,20 @@ |
// found in the LICENSE file. |
self.addEventListener('paymentrequest', e => { |
+ e.waitUntil(clients.matchAll({includeUncontrolled: true}).then(clients => { |
+ clients.forEach(client => { |
+ if (client.url.indexOf('payment_app_invocation.html') != -1) { |
+ client.postMessage(e.topLevelOrigin); |
+ client.postMessage(e.paymentRequestOrigin); |
+ client.postMessage(e.paymentRequestId); |
+ client.postMessage(JSON.stringify(e.methodData)); |
+ client.postMessage(JSON.stringify(e.total)); |
+ client.postMessage(JSON.stringify(e.modifiers)); |
+ client.postMessage(e.instrumentKey); |
+ } |
+ }); |
+ })); |
+ |
// SW -------------------- openWindow() ------------------> payment_app_window |
// SW <----- postMessage('payment_app_window_ready') ------ payment_app_window |
// SW -------- postMessage('payment_app_request') --------> payment_app_window |