Bug 569744 - Delayed loading of service.js causes test failures [r=Mardak]

Have FakeCryptoService.generateRandomIV() return 24 bytes so that Weave.Service._checkCrypto() believes it's the real deal. Fix undeclared variable.
This commit is contained in:
Philipp von Weitershausen 2010-06-23 12:36:48 +02:00
Родитель 20d8fc6912
Коммит d66903d744
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -240,7 +240,8 @@ FakeCryptoService.prototype = {
},
generateRandomIV: function() {
return "fake-random-iv";
// A base64-encoded IV is 24 characters long
return "fake-fake-fake-random-iv";
},
generateRandomBytes: function(aByteCount) {

Просмотреть файл

@ -274,7 +274,7 @@ function test_syncStartup_metaGet404() {
do_check_eq(collection.wbos.scotsman.payload, undefined);
_("New bulk key was uploaded");
key = crypto_steam.data.keyring["http://localhost:8080/1.0/foo/storage/keys/pubkey"];
let key = crypto_steam.data.keyring["http://localhost:8080/1.0/foo/storage/keys/pubkey"];
do_check_eq(key.wrapped, "fake-symmetric-key-0");
do_check_eq(key.hmac, "fake-symmetric-key-0 ");