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

Unified Diff: content/test/data/background_sync/service_worker.js

Issue 1613053004: [Background Sync Cleanup] Remove mention of oneshot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@purge_periodic
Patch Set: Nit Created 4 years, 11 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/background_sync/background_sync_test_helpers.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/background_sync/service_worker.js
diff --git a/content/test/data/background_sync/service_worker.js b/content/test/data/background_sync/service_worker.js
index 140759d208b6d868567e83b3475012faf9aa5121..dd180d40c7fea9784cf5d7d25a96f82418636152 100644
--- a/content/test/data/background_sync/service_worker.js
+++ b/content/test/data/background_sync/service_worker.js
@@ -7,7 +7,7 @@
// passed through to the document unchanged.
//
// "delay" - Delays finishing the sync event with event.waitUntil.
-// Send a postMessage of "completeDelayedOneShot" to finish the
+// Send a postMessage of "completeDelayedRegistration" to finish the
// event.
'use strict';
@@ -16,7 +16,7 @@ var resolveCallback = null;
var rejectCallback = null;
this.onmessage = function(event) {
- if (event.data['action'] === 'completeDelayedOneShot') {
+ if (event.data['action'] === 'completeDelayedSyncEvent') {
if (resolveCallback === null) {
sendMessageToClients('sync', 'error - resolveCallback is null');
return;
@@ -27,7 +27,7 @@ this.onmessage = function(event) {
return;
}
- if (event.data['action'] === 'rejectDelayedOneShot') {
+ if (event.data['action'] === 'rejectDelayedSyncEvent') {
if (rejectCallback === null) {
sendMessageToClients('sync', 'error - rejectCallback is null');
return;
@@ -37,7 +37,7 @@ this.onmessage = function(event) {
sendMessageToClients('sync', 'ok - delay rejected');
}
- if (event.data['action'] === 'registerOneShot') {
+ if (event.data['action'] === 'register') {
var tag = event.data['tag'];
registration.sync.register(tag)
.then(function () {
@@ -46,9 +46,9 @@ this.onmessage = function(event) {
.catch(sendSyncErrorToClients);
}
- if (event.data['action'] === 'getRegistrationOneShot') {
+ if (event.data['action'] === 'hasTag') {
var tag = event.data['tag'];
- registration.sync.getTags(tag)
+ registration.sync.getTags()
.then(function(tags) {
if (tags.indexOf(tag) >= 0) {
sendMessageToClients('register', 'ok - ' + tag + ' found');
@@ -60,7 +60,7 @@ this.onmessage = function(event) {
.catch(sendSyncErrorToClients);
}
- if (event.data['action'] === 'getRegistrationsOneShot') {
+ if (event.data['action'] === 'getTags') {
registration.sync.getTags()
.then(function(tags) {
sendMessageToClients('register', 'ok - ' + tags.toString());
« no previous file with comments | « content/test/data/background_sync/background_sync_test_helpers.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698