mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Refactored password sync test to use newly-added functionality in the sync testing infrastructure.
This commit is contained in:
parent
49ad3beeab
commit
24bfe869f6
@ -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 " +
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user