mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Finished test_passwords.js, although it raises a number of strict warnings.
This commit is contained in:
parent
837747b2b8
commit
6046183cfa
@ -164,6 +164,7 @@ function FakeDAVService(contents) {
|
||||
|
||||
FakeDAVService.prototype = {
|
||||
PUT: function fake_PUT(path, data, onComplete) {
|
||||
Log4Moz.Service.rootLogger.info("Putting " + path);
|
||||
this.fakeContents[path] = data;
|
||||
makeFakeAsyncFunc({status: 200}).async(this, onComplete);
|
||||
},
|
||||
|
@ -15,7 +15,8 @@ function run_test() {
|
||||
var fts = new FakeTimerService();
|
||||
var logStats = initTestLogging();
|
||||
|
||||
ID.set('Engine:PBE:default', new Identity('Mozilla Services Encryption Passphrase', 'foo'));
|
||||
ID.set('Engine:PBE:default',
|
||||
new Identity('Mozilla Services Encryption Passphrase', 'foo'));
|
||||
|
||||
// The JS module we're testing, with all members exposed.
|
||||
var passwords = loadInSandbox("resource://weave/engines/passwords.js");
|
||||
@ -40,6 +41,14 @@ function run_test() {
|
||||
return {exists: function() {return false;}};
|
||||
};
|
||||
|
||||
Utils.open = function fake_open(file, mode) {
|
||||
let fakeStream = {
|
||||
writeString: function(data) {Log4Moz.Service.rootLogger.debug(data);},
|
||||
close: function() {}
|
||||
};
|
||||
return [fakeStream];
|
||||
};
|
||||
|
||||
// Ensure that _hashLoginInfo() works.
|
||||
var fakeUserHash = passwords._hashLoginInfo(fakeUser);
|
||||
do_check_eq(typeof fakeUserHash, 'string');
|
||||
|
Loading…
Reference in New Issue
Block a user