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

Unified Diff: content/test/data/background_sync/background_sync_test_helpers.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
Index: content/test/data/background_sync/background_sync_test_helpers.js
diff --git a/content/test/data/background_sync/background_sync_test_helpers.js b/content/test/data/background_sync/background_sync_test_helpers.js
index 7d118752a510297c88b4a1d742a24ce9740aca6f..a03963d617b1bb6db804f6a05f09b36d20ca8ba8 100644
--- a/content/test/data/background_sync/background_sync_test_helpers.js
+++ b/content/test/data/background_sync/background_sync_test_helpers.js
@@ -31,7 +31,7 @@ function registerServiceWorker() {
.catch(sendErrorToTest);
}
-function registerOneShot(tag) {
+function register(tag) {
navigator.serviceWorker.ready
.then(function(swRegistration) {
return swRegistration.sync.register(tag);
@@ -42,16 +42,16 @@ function registerOneShot(tag) {
.catch(sendErrorToTest);
}
-function registerOneShotFromServiceWorker(tag) {
+function registerFromServiceWorker(tag) {
navigator.serviceWorker.ready
.then(function(swRegistration) {
- swRegistration.active.postMessage({action: 'registerOneShot', tag: tag});
+ swRegistration.active.postMessage({action: 'register', tag: tag});
sendResultToTest('ok - ' + tag + ' register sent to SW');
})
.catch(sendErrorToTest);
}
-function getRegistrationOneShot(tag) {
+function hasTag(tag) {
navigator.serviceWorker.ready
.then(function(swRegistration) {
return swRegistration.sync.getTags();
@@ -67,17 +67,17 @@ function getRegistrationOneShot(tag) {
.catch(sendErrorToTest);
}
-function getRegistrationOneShotFromServiceWorker(tag) {
+function hasTagFromServiceWorker(tag) {
navigator.serviceWorker.ready
.then(function(swRegistration) {
swRegistration.active.postMessage(
- {action: 'getRegistrationOneShot', tag: tag});
- sendResultToTest('ok - getRegistration sent to SW');
+ {action: 'hasTag', tag: tag});
+ sendResultToTest('ok - hasTag sent to SW');
})
.catch(sendErrorToTest);
}
-function getRegistrationsOneShot(tag) {
+function getTags() {
navigator.serviceWorker.ready
.then(function(swRegistration) {
return swRegistration.sync.getTags();
@@ -88,28 +88,30 @@ function getRegistrationsOneShot(tag) {
.catch(sendErrorToTest);
}
-function getRegistrationsOneShotFromServiceWorker() {
+function getTagsFromServiceWorker() {
navigator.serviceWorker.ready
.then(function(swRegistration) {
- swRegistration.active.postMessage({action: 'getRegistrationsOneShot'});
- sendResultToTest('ok - getRegistrations sent to SW');
+ swRegistration.active.postMessage({action: 'getTags'});
+ sendResultToTest('ok - getTags sent to SW');
})
.catch(sendErrorToTest);
}
-function completeDelayedOneShot() {
+function completeDelayedSyncEvent() {
navigator.serviceWorker.ready
.then(function(swRegistration) {
- swRegistration.active.postMessage({action: 'completeDelayedOneShot'});
+ swRegistration.active.postMessage({
+ action: 'completeDelayedSyncEvent'
+ });
sendResultToTest('ok - delay completing');
})
.catch(sendErrorToTest);
}
-function rejectDelayedOneShot() {
+function rejectDelayedSyncEvent() {
navigator.serviceWorker.ready
.then(function(swRegistration) {
- swRegistration.active.postMessage({action: 'rejectDelayedOneShot'});
+ swRegistration.active.postMessage({action: 'rejectDelayedSyncEvent'});
sendResultToTest('ok - delay rejecting');
})
.catch(sendErrorToTest);
@@ -124,7 +126,7 @@ function createFrame(url) {
});
}
-function registerOneShotFromLocalFrame(frame_url) {
+function registerFromLocalFrame(frame_url) {
var frameWindow;
return createFrame(frame_url)
.then(function(frame) {
@@ -157,7 +159,7 @@ function receiveMessage() {
});
}
-function registerOneShotFromCrossOriginServiceWorker(cross_frame_url) {
+function registerFromCrossOriginServiceWorker(cross_frame_url) {
return createFrame(cross_frame_url)
.then(function(frame) {
return receiveMessage();

Powered by Google App Engine
This is Rietveld 408576698