зеркало из https://github.com/mozilla/gecko-dev.git
Added more fake prefs to the password test to eliminate strict warnings, added logging code to identity.js to aid in debugging.
This commit is contained in:
Родитель
e8e2bce2ce
Коммит
f9a93ee91d
|
@ -52,13 +52,16 @@ Utils.lazy(this, 'ID', IDManager);
|
|||
function IDManager() {
|
||||
this._ids = {};
|
||||
this._aliases = {};
|
||||
this._log = Log4Moz.Service.getLogger("Service.Identity");
|
||||
}
|
||||
IDManager.prototype = {
|
||||
get: function IDMgr_get(name) {
|
||||
if (this._aliases[name])
|
||||
if (name in this._aliases)
|
||||
return this._ids[this._aliases[name]];
|
||||
else
|
||||
if (name in this._ids)
|
||||
return this._ids[name];
|
||||
this._log.warn("No identity found for '" + name + "'.");
|
||||
return null;
|
||||
},
|
||||
set: function IDMgr_set(name, id) {
|
||||
this._ids[name] = id;
|
||||
|
|
|
@ -8,9 +8,16 @@ let __fakePasswords = {
|
|||
'Mozilla Services Encryption Passphrase': {foo: "passphrase"}
|
||||
};
|
||||
|
||||
let __fakePrefs = {
|
||||
"encryption" : "none",
|
||||
"log.logger.service.crypto" : "Debug",
|
||||
"log.logger.service.engine" : "Debug",
|
||||
"log.logger.async" : "Debug"
|
||||
};
|
||||
|
||||
function run_test() {
|
||||
var fpasses = new FakePasswordService(__fakePasswords);
|
||||
var fprefs = new FakePrefService({"encryption" : "none"});
|
||||
var fprefs = new FakePrefService(__fakePrefs);
|
||||
var fds = new FakeDAVService({});
|
||||
var fts = new FakeTimerService();
|
||||
var logStats = initTestLogging();
|
||||
|
|
Загрузка…
Ссылка в новой задаче