Merge f-t to m-c

This commit is contained in:
Phil Ringnalda 2013-12-28 20:20:29 -08:00
commit fca94d9b16
3 changed files with 9 additions and 9 deletions

View File

@ -218,7 +218,7 @@ SyncScheduler.prototype = {
// were just active.)
this.adjustSyncInterval();
break;
case "back":
case "active":
this._log.trace("Received notification that we're back from idle.");
this.idle = false;
Utils.namedTimer(function onBack() {

View File

@ -270,7 +270,7 @@ add_identity_test(this, function test_back_triggers_sync() {
// Single device: no sync triggered.
scheduler.idle = true;
scheduler.observe(null, "back", Svc.Prefs.get("scheduler.idleTime"));
scheduler.observe(null, "active", Svc.Prefs.get("scheduler.idleTime"));
do_check_false(scheduler.idle);
// Multiple devices: sync is triggered.
@ -291,7 +291,7 @@ add_identity_test(this, function test_back_triggers_sync() {
});
scheduler.idle = true;
scheduler.observe(null, "back", Svc.Prefs.get("scheduler.idleTime"));
scheduler.observe(null, "active", Svc.Prefs.get("scheduler.idleTime"));
do_check_false(scheduler.idle);
yield deferred.promise;
});

View File

@ -638,12 +638,12 @@ add_identity_test(this, function test_back_triggersSync() {
cleanUpAndGo().then(deferred.resolve);
});
// Send a 'back' event to trigger sync soonish.
scheduler.observe(null, "back", Svc.Prefs.get("scheduler.idleTime"));
// Send an 'active' event to trigger sync soonish.
scheduler.observe(null, "active", Svc.Prefs.get("scheduler.idleTime"));
yield deferred.promise;
});
add_identity_test(this, function test_back_triggersSync_observesBackoff() {
add_identity_test(this, function test_active_triggersSync_observesBackoff() {
// Confirm defaults.
do_check_false(scheduler.idle);
@ -669,8 +669,8 @@ add_identity_test(this, function test_back_triggersSync_observesBackoff() {
cleanUpAndGo().then(deferred.resolve);
}, IDLE_OBSERVER_BACK_DELAY * 1.5, {}, "timer");
// Send a 'back' event to try to trigger sync soonish.
scheduler.observe(null, "back", Svc.Prefs.get("scheduler.idleTime"));
// Send an 'active' event to try to trigger sync soonish.
scheduler.observe(null, "active", Svc.Prefs.get("scheduler.idleTime"));
yield deferred.promise;
});
@ -691,7 +691,7 @@ add_identity_test(this, function test_back_debouncing() {
Svc.Obs.add("weave:service:login:start", onLoginStart);
// Create spurious back-then-idle events as observed on OS X:
scheduler.observe(null, "back", Svc.Prefs.get("scheduler.idleTime"));
scheduler.observe(null, "active", Svc.Prefs.get("scheduler.idleTime"));
scheduler.observe(null, "idle", Svc.Prefs.get("scheduler.idleTime"));
let deferred = Promise.defer();