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

Unified Diff: chrome/test/data/extensions/api_test/service_worker/payments/page.js

Issue 2880133002: PaymentHandler: Should not allow accessing PaymentManager in Extension.
Patch Set: PaymentHandler: Should not allow accessing PaymentManager in Extension. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/service_worker/payments/page.js
diff --git a/chrome/test/data/extensions/api_test/service_worker/payments/page.js b/chrome/test/data/extensions/api_test/service_worker/payments/page.js
new file mode 100644
index 0000000000000000000000000000000000000000..01304f3b166e4b3b6760e3da9b13e39e5045be94
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/service_worker/payments/page.js
@@ -0,0 +1,15 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+window.runServiceWorker = function() {
+ navigator.serviceWorker.register('sw.js').then(function() {
+ return navigator.serviceWorker.ready;
+ }).then(function(registration) {
+ return registration.paymentManager;
+ }).then(function(paymentManager) {
+ window.domAutomationController.send(paymentManager);
+ }).catch(function(error) {
+ window.domAutomationController.send(error.name);
+ });
+};

Powered by Google App Engine
This is Rietveld 408576698