Refactored password sync test to use newly-added functionality in the sync testing infrastructure.

This commit is contained in:
Atul Varma 2008-06-26 11:40:14 -07:00
parent 49ad3beeab
commit 24bfe869f6
2 changed files with 3 additions and 3 deletions

View File

@ -27,6 +27,7 @@ function FakeLoginManager(fakeLogins) {
Utils.getLoginManager = function fake_getLoginManager() {
// Return a fake nsILoginManager object.
return {
removeAllLogins: function() { self.fakeLogins = []; },
getAllLogins: function() { return self.fakeLogins; },
addLogin: function(login) {
getTestLogger().info("nsILoginManager.addLogin() called " +

View File

@ -7,7 +7,7 @@ load("fake_login_manager.js");
// ----------------------------------------
function run_test() {
var syncTesting = new SyncTestingInfrastructure();
var syncTesting = new SyncTestingInfrastructure(PasswordEngine);
var fakeLoginManager = new FakeLoginManager(fakeSampleLogins);
function freshEngineSync(cb) {
@ -35,8 +35,7 @@ function run_test() {
syncTesting.runAsyncFunc("remove user and re-sync", freshEngineSync);
syncTesting.fakeFilesystem.fakeContents = {};
fakeLoginManager.fakeLogins = [];
syncTesting.resetClientState();
syncTesting.runAsyncFunc("resync on second computer", freshEngineSync);
}