Bug 1241715 - get Sync TPS tests working locally by tweaking observers listened for and the authentication setup. r=whimboo

This commit is contained in:
Mark Hammond 2016-02-03 11:21:09 +11:00
parent f6b39209c3
commit 85cf8bda88
3 changed files with 7 additions and 7 deletions

View File

@ -161,7 +161,7 @@ var HistoryEntry = {
} }
let all_items_found = true; let all_items_found = true;
for (let itemvisit in item.visits) { for (let itemvisit of item.visits) {
all_items_found = all_items_found && "found" in itemvisit; all_items_found = all_items_found && "found" in itemvisit;
Logger.logInfo("History entry for " + item.uri + ", type:" + Logger.logInfo("History entry for " + item.uri + ", type:" +
itemvisit.type + ", date:" + itemvisit.date + itemvisit.type + ", date:" + itemvisit.date +

View File

@ -888,7 +888,6 @@ var TPS = {
// that complete. // that complete.
if (this.fxaccounts_enabled) { if (this.fxaccounts_enabled) {
this._triggeredSync = true; this._triggeredSync = true;
this.waitForEvent("weave:service:sync:start");
this.waitForSyncFinished(); this.waitForSyncFinished();
} }
}, },
@ -919,6 +918,7 @@ var TPS = {
this._triggeredSync = true; this._triggeredSync = true;
this.StartAsyncOperation(); this.StartAsyncOperation();
Weave.Service.sync(); Weave.Service.sync();
Logger.logInfo("Sync is complete");
}, },
WipeServer: function TPS__WipeServer() { WipeServer: function TPS__WipeServer() {

View File

@ -342,11 +342,11 @@ class TPSTestRunner(object):
if self.mobile: if self.mobile:
self.preferences.update({'services.sync.client.type' : 'mobile'}) self.preferences.update({'services.sync.client.type' : 'mobile'})
# Set a dummy username to force the correct authentication type. For the # If we are using legacy Sync, then set a dummy username to force the
# old sync, the username is not allowed to contain a '@'. # correct authentication type. Without this pref set to a value
dummy = {'fx_account': 'dummy@somewhere', 'sync_account': 'dummy'} # without an '@' character, Sync will initialize for FxA.
auth_type = self.config.get('auth_type', 'fx_account') if self.config.get('auth_type', 'fx_account') != "fx_account":
self.preferences.update({'services.sync.username': dummy[auth_type]}) self.preferences.update({'services.sync.username': "dummy"})
if self.debug: if self.debug:
self.preferences.update(self.debug_preferences) self.preferences.update(self.debug_preferences)