This commit is contained in:
Atul Varma 2008-06-26 11:40:24 -07:00
commit 0dfa48971f
3 changed files with 19 additions and 31 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);
}

View File

@ -3,7 +3,7 @@ Testing INFO -----------------------------------------
Testing INFO Step 'initial sync' starting.
Testing INFO -----------------------------------------
Service.PasswordEngine INFO Beginning sync
Testing INFO HTTP MKCOL on user-data/passwords/
Testing INFO HTTP MKCOL on user-data/passwords/deltas
Service.RemoteStore DEBUG Downloading status file
Testing INFO HTTP GET from user-data/passwords/status.json, returning status 404
Service.PasswordEngine INFO Initial upload to server
@ -16,11 +16,6 @@ Service.Crypto DEBUG NOT encrypting data
Testing INFO HTTP PUT to user-data/passwords/snapshot.json with data: {"805ec58eb8dcded602999967e139be21acd0f194":{"hostname":"www.boogle.com","formSubmitURL":"http://www.boogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person","passwordField":"test_password"}}
Service.Resource DEBUG PUT request successful
Service.JsonFilter DEBUG Encoding data as JSON
Service.CryptoFilter DEBUG Encrypting data
Service.Crypto DEBUG NOT encrypting data
Testing INFO HTTP PUT to user-data/passwords/deltas.json with data: []
Service.Resource DEBUG PUT request successful
Service.JsonFilter DEBUG Encoding data as JSON
Testing INFO HTTP PUT to user-data/passwords/status.json with data: {"GUID":"fake-guid-0","formatVersion":2,"snapVersion":0,"maxVersion":0,"snapEncryption":"none","deltasEncryption":"none","itemCount":1}
Service.Resource DEBUG PUT request successful
Service.RemoteStore INFO Full upload to server successful
@ -35,7 +30,7 @@ Testing INFO Opening 'weave/snapshots/passwords.json' for reading.
Testing INFO Reading from stream.
Service.SnapStore INFO Read saved snapshot from disk
Service.PasswordEngine INFO Beginning sync
Testing INFO HTTP MKCOL on user-data/passwords/
Testing INFO HTTP MKCOL on user-data/passwords/deltas
Service.RemoteStore DEBUG Downloading status file
Testing INFO HTTP GET from user-data/passwords/status.json, returning status 200
Service.Resource DEBUG GET request successful
@ -54,7 +49,7 @@ Testing INFO Opening 'weave/snapshots/passwords.json' for reading.
Testing INFO Reading from stream.
Service.SnapStore INFO Read saved snapshot from disk
Service.PasswordEngine INFO Beginning sync
Testing INFO HTTP MKCOL on user-data/passwords/
Testing INFO HTTP MKCOL on user-data/passwords/deltas
Service.RemoteStore DEBUG Downloading status file
Testing INFO HTTP GET from user-data/passwords/status.json, returning status 200
Service.Resource DEBUG GET request successful
@ -73,16 +68,11 @@ Service.PasswordEngine INFO Server conflicts: 0
Service.PasswordEngine INFO Actual changes for server: 1
Service.PasswordEngine DEBUG Actual changes for server: [{"action":"create","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[],"data":{"hostname":"www.yoogle.com","formSubmitURL":"http://www.yoogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person2","passwordField":"test_password2"}}]
Service.PasswordEngine INFO Uploading changes to server
Testing INFO HTTP GET from user-data/passwords/deltas.json, returning status 200
Service.Resource DEBUG GET request successful
Service.CryptoFilter DEBUG Decrypting data
Service.Crypto DEBUG NOT decrypting data
Service.JsonFilter DEBUG Decoding JSON data
Service.JsonFilter DEBUG Encoding data as JSON
Service.CryptoFilter DEBUG Encrypting data
Service.Crypto DEBUG NOT encrypting data
Testing INFO HTTP PUT to user-data/passwords/deltas.json with data: [[{"action":"create","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[],"data":{"hostname":"www.yoogle.com","formSubmitURL":"http://www.yoogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person2","passwordField":"test_password2"}}]]
Service.Resource DEBUG PUT request successful
Testing INFO HTTP PUT to user-data/passwords/deltas/1 with data: [{"action":"create","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[],"data":{"hostname":"www.yoogle.com","formSubmitURL":"http://www.yoogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person2","passwordField":"test_password2"}}]
Service.ResourceSet DEBUG PUT request successful
Service.JsonFilter DEBUG Encoding data as JSON
Testing INFO HTTP PUT to user-data/passwords/status.json with data: {"GUID":"fake-guid-0","formatVersion":2,"snapVersion":0,"maxVersion":1,"snapEncryption":"none","deltasEncryption":"none","itemCount":2}
Service.Resource DEBUG PUT request successful
@ -99,7 +89,7 @@ Testing INFO Opening 'weave/snapshots/passwords.json' for reading.
Testing INFO Reading from stream.
Service.SnapStore INFO Read saved snapshot from disk
Service.PasswordEngine INFO Beginning sync
Testing INFO HTTP MKCOL on user-data/passwords/
Testing INFO HTTP MKCOL on user-data/passwords/deltas
Service.RemoteStore DEBUG Downloading status file
Testing INFO HTTP GET from user-data/passwords/status.json, returning status 200
Service.Resource DEBUG GET request successful
@ -118,16 +108,11 @@ Service.PasswordEngine INFO Server conflicts: 0
Service.PasswordEngine INFO Actual changes for server: 1
Service.PasswordEngine DEBUG Actual changes for server: [{"action":"remove","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[]}]
Service.PasswordEngine INFO Uploading changes to server
Testing INFO HTTP GET from user-data/passwords/deltas.json, returning status 200
Service.Resource DEBUG GET request successful
Service.CryptoFilter DEBUG Decrypting data
Service.Crypto DEBUG NOT decrypting data
Service.JsonFilter DEBUG Decoding JSON data
Service.JsonFilter DEBUG Encoding data as JSON
Service.CryptoFilter DEBUG Encrypting data
Service.Crypto DEBUG NOT encrypting data
Testing INFO HTTP PUT to user-data/passwords/deltas.json with data: [[{"action":"create","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[],"data":{"hostname":"www.yoogle.com","formSubmitURL":"http://www.yoogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person2","passwordField":"test_password2"}}],[{"action":"remove","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[]}]]
Service.Resource DEBUG PUT request successful
Testing INFO HTTP PUT to user-data/passwords/deltas/2 with data: [{"action":"remove","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[]}]
Service.ResourceSet DEBUG PUT request successful
Service.JsonFilter DEBUG Encoding data as JSON
Testing INFO HTTP PUT to user-data/passwords/status.json with data: {"GUID":"fake-guid-0","formatVersion":2,"snapVersion":0,"maxVersion":2,"snapEncryption":"none","deltasEncryption":"none","itemCount":1}
Service.Resource DEBUG PUT request successful
@ -141,7 +126,7 @@ Testing INFO -----------------------------------------
Testing INFO Step 'resync on second computer' starting.
Testing INFO -----------------------------------------
Service.PasswordEngine INFO Beginning sync
Testing INFO HTTP MKCOL on user-data/passwords/
Testing INFO HTTP MKCOL on user-data/passwords/deltas
Service.RemoteStore DEBUG Downloading status file
Testing INFO HTTP GET from user-data/passwords/status.json, returning status 200
Service.Resource DEBUG GET request successful
@ -152,19 +137,22 @@ Service.PasswordEngine INFO Local snapshot version: -1
Service.PasswordEngine INFO Server maxVersion: 2
Service.RemoteStore TRACE Getting latest from snap --> scratch
Service.RemoteStore INFO Downloading all server data from scratch
Service.RemoteStore DEBUG Downloading server snapshot
Testing INFO HTTP GET from user-data/passwords/snapshot.json, returning status 200
Service.Resource DEBUG GET request successful
Service.CryptoFilter DEBUG Decrypting data
Service.Crypto DEBUG NOT decrypting data
Service.JsonFilter DEBUG Decoding JSON data
Service.RemoteStore DEBUG Downloading server deltas
Testing INFO HTTP GET from user-data/passwords/deltas.json, returning status 200
Service.Resource DEBUG GET request successful
Testing INFO HTTP GET from user-data/passwords/deltas/1, returning status 200
Service.ResourceSet DEBUG GET request successful
Service.CryptoFilter DEBUG Decrypting data
Service.Crypto DEBUG NOT decrypting data
Service.JsonFilter DEBUG Decoding JSON data
Service.SnapStore TRACE Processing command: {"action":"create","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[],"data":{"hostname":"www.yoogle.com","formSubmitURL":"http://www.yoogle.com/search","httpRealm":"","username":"","password":"","usernameField":"test_person2","passwordField":"test_password2"}}
Testing INFO HTTP GET from user-data/passwords/deltas/2, returning status 200
Service.ResourceSet DEBUG GET request successful
Service.CryptoFilter DEBUG Decrypting data
Service.Crypto DEBUG NOT decrypting data
Service.JsonFilter DEBUG Decoding JSON data
Service.SnapStore TRACE Processing command: {"action":"remove","GUID":"1b3869fc36234b39cd354f661ed1d7d148394ca3","depth":0,"parents":[]}
Service.PasswordEngine INFO Reconciling client/server updates
Service.PasswordSync DEBUG Reconciling 0 against 1 commands