mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 996027 - Ensure that TPS always fakes login into Weave. r=rnewman DONTBUILD
This commit is contained in:
parent
0f340e34ff
commit
b8f85e3a20
@ -79,9 +79,18 @@ var Authentication = {
|
||||
});
|
||||
|
||||
try {
|
||||
return cb.wait();
|
||||
cb.wait();
|
||||
|
||||
if (Weave.Status.login !== Weave.LOGIN_SUCCEEDED) {
|
||||
Logger.logInfo("Logging into Weave.");
|
||||
Weave.Service.login();
|
||||
Logger.AssertEqual(Weave.Status.login, Weave.LOGIN_SUCCEEDED,
|
||||
"Weave logged in");
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
throw new Error("signIn() failed with: " + JSON.stringify(error));
|
||||
throw new Error("signIn() failed with: " + error.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -68,9 +68,16 @@ var Authentication = {
|
||||
Weave.Service.identity.basicPassword = account["password"];
|
||||
Weave.Service.identity.syncKey = account["passphrase"];
|
||||
|
||||
// Fake the login
|
||||
Weave.Service.login();
|
||||
Weave.Svc.Obs.notify("weave:service:setup-complete");
|
||||
if (Weave.Status.login !== Weave.LOGIN_SUCCEEDED) {
|
||||
Logger.logInfo("Logging into Weave.");
|
||||
Weave.Service.login();
|
||||
Logger.AssertEqual(Weave.Status.login, Weave.LOGIN_SUCCEEDED,
|
||||
"Weave logged in");
|
||||
|
||||
// Bug 997279: Temporary workaround until we can ensure that Sync itself
|
||||
// sends this notification for the first login attempt by TPS
|
||||
Weave.Svc.Obs.notify("weave:service:setup-complete");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -837,7 +837,6 @@ let TPS = {
|
||||
let account = this.fxaccounts_enabled ? this.config.fx_account
|
||||
: this.config.sync_account;
|
||||
Authentication.signIn(account);
|
||||
|
||||
this.waitForSetupComplete();
|
||||
Logger.AssertEqual(Weave.Status.service, Weave.STATUS_OK, "Weave status OK");
|
||||
this.waitForTracking();
|
||||
|
Loading…
Reference in New Issue
Block a user