Closed Bug 1130663 Opened 5 years ago Closed 5 years ago

requestsync-manager API to allow for an immediate sync

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox36 --- wontfix
firefox37 --- wontfix
firefox38 --- fixed
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: jrburke, Assigned: baku)

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

Feature request:

While testing, it would be nice if my certified app with requestsync-manager permissions was able to immediately trigger a sync for a given sync task. 

Then I could manually test what happens when the email app receives the setMessageHandler('request-sync') for certain testing scenarios, instead of waiting for an interval to pass.

While talking in IRC about it, :asuth also mentioned that this might also be useful for a case where a requestsync-manager app could allow the user to immediately trigger all of the sync tasks before dropping offline for a while.
Flags: needinfo?(amarchesini)
Makes definitely sense. Let me work on it.
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attached patch runnow.patchSplinter Review
Attachment #8561507 - Flags: review?(ehsan)
Attachment #8561507 - Flags: review?(ehsan) → review?(fabrice)
Comment on attachment 8561507 [details] [diff] [review]
runnow.patch

Review of attachment 8561507 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/requestsync/RequestSyncService.jsm
@@ +551,5 @@
> +  managerRunTask: function(aTarget, aData, aPrincipal) {
> +    debug("runTask");
> +
> +    let task = null;
> +    let self = this;

It looks like you don't use |self| at all.
Attachment #8561507 - Flags: review?(fabrice) → review+
Keywords: dev-doc-needed
OS: Mac OS X → All
Hardware: x86 → All
https://hg.mozilla.org/mozilla-central/rev/f5128665af10
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.