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

Unified Diff: chrome/test/data/push_messaging/service_worker.js

Issue 2449963002: Fix bug in service worker push tests: don't cache subscription options (Closed)
Patch Set: Fix bug in sw push tests: stop caching subscription options between messages Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/push_messaging/service_worker.js
diff --git a/chrome/test/data/push_messaging/service_worker.js b/chrome/test/data/push_messaging/service_worker.js
index f32068849a8fb2b3995e84fd895d82133efc97a0..15332d4478714b08199296d3cfb0f2686f81d92a 100644
--- a/chrome/test/data/push_messaging/service_worker.js
+++ b/chrome/test/data/push_messaging/service_worker.js
@@ -6,10 +6,6 @@
// which would affect the scope of the importScripts call here.
self.importScripts('/push_messaging/push_constants.js');
-var pushSubscriptionOptions = {
- userVisibleOnly: true
-};
-
// The "onpush" event currently understands two values as message payload
// data coming from the test. Any other input is passed through to the
// document unchanged.
@@ -47,6 +43,9 @@ this.onpush = function(event) {
};
self.addEventListener('message', function handler (event) {
+ let pushSubscriptionOptions = {
+ userVisibleOnly: true
+ };
if (event.data.command == 'workerSubscribe') {
pushSubscriptionOptions.applicationServerKey = kApplicationServerKey.buffer;
} else if (event.data.command == 'workerSubscribeNoKey') {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698