mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 570152 - engine.js tests should completely reset preferences [r=mconnor]
Switch to resetBranch("") instead of resetting individual prefs.
This commit is contained in:
parent
66a57fc0d9
commit
c0bcc6524a
@ -136,7 +136,7 @@ function test_enabled() {
|
||||
engine.enabled = false;
|
||||
do_check_false(Svc.Prefs.get("engine.steam"));
|
||||
} finally {
|
||||
Svc.Prefs.reset("engine.steam");
|
||||
Svc.Prefs.resetBranch("");
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ function test_sync() {
|
||||
do_check_eq(engineObserver.topics[0], "weave:engine:sync:start");
|
||||
do_check_eq(engineObserver.topics[1], "weave:engine:sync:finish");
|
||||
} finally {
|
||||
Svc.Prefs.reset("engine.steam");
|
||||
Svc.Prefs.resetBranch("");
|
||||
engine.wasSynced = false;
|
||||
engineObserver.reset();
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ function test_url_attributes() {
|
||||
"https://cluster/1.0/foo/storage/crypto/steam");
|
||||
do_check_eq(engine.metaURL, "https://cluster/1.0/foo/storage/meta/global");
|
||||
} finally {
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.resetBranch("");
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ function test_syncID() {
|
||||
do_check_eq(Svc.Prefs.get("steam.syncID"), "fake-guid-1");
|
||||
do_check_eq(engine.syncID, "fake-guid-1");
|
||||
} finally {
|
||||
Svc.Prefs.reset("steam.syncID");
|
||||
Svc.Prefs.resetBranch("");
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
}
|
||||
}
|
||||
@ -60,7 +60,7 @@ function test_lastSync() {
|
||||
do_check_eq(engine.lastSync, 0);
|
||||
do_check_eq(Svc.Prefs.get("steam.lastSync"), "0");
|
||||
} finally {
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,6 +108,6 @@ function test_resetClient() {
|
||||
do_check_eq(engine.toFetch.length, 0);
|
||||
} finally {
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
}
|
||||
}
|
||||
|
@ -223,9 +223,7 @@ function test_syncStartup_emptyOrOutdatedGlobalsResetsSync() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.syncID");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -257,7 +255,7 @@ function test_syncStartup_serverHasNewerVersion() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
}
|
||||
@ -300,9 +298,7 @@ function test_syncStartup_syncIDMismatchResetsClient() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.syncID");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -371,9 +367,7 @@ function test_syncStartup_badKeyWipesServerData() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.syncID");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -404,8 +398,7 @@ function test_processIncoming_emptyServer() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -458,8 +451,7 @@ function test_processIncoming_createFromServer() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -580,8 +572,7 @@ function test_processIncoming_reconcile() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -686,9 +677,7 @@ function test_processIncoming_fetchNum() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("client.type");
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -742,8 +731,7 @@ function test_uploadOutgoing_toEmptyServer() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -800,8 +788,7 @@ function test_uploadOutgoing_MAX_UPLOAD_RECORDS() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.reset("steam.lastSync");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
CryptoMetas.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
@ -856,7 +843,7 @@ function test_syncFinish_deleteByIds() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
}
|
||||
@ -928,7 +915,7 @@ function test_syncFinish_deleteLotsInBatches() {
|
||||
|
||||
} finally {
|
||||
server.stop(function() {});
|
||||
Svc.Prefs.reset("clusterURL");
|
||||
Svc.Prefs.resetBranch("");
|
||||
Records.clearCache();
|
||||
syncTesting = new SyncTestingInfrastructure(makeSteamEngine);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user