зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1567667 - Decrypted strings returned from asyncDecryptStrings need to be converted to UTF16. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D39443 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b6589b23d2
Коммит
d2b2321cc8
|
@ -77,7 +77,7 @@ void BackgroundSdrDecryptStrings(const nsTArray<nsCString>& encryptedStrings,
|
|||
break;
|
||||
}
|
||||
|
||||
plainTexts.AppendElement(NS_ConvertASCIItoUTF16(plainText));
|
||||
plainTexts.AppendElement(NS_ConvertUTF8toUTF16(plainText));
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRunnable> runnable(
|
||||
|
|
|
@ -174,16 +174,15 @@ add_task(async function testAsyncDecryptStrings() {
|
|||
let decrypteds = await sdr.asyncDecryptStrings(encryptedStrings);
|
||||
for (let i = 0; i < encryptedStrings.length; i++) {
|
||||
let decrypted = decrypteds[i];
|
||||
let expectedDecryptedString = convertedTestCases[i];
|
||||
|
||||
equal(
|
||||
decrypted,
|
||||
expectedDecryptedString,
|
||||
testCases[i],
|
||||
"decrypted string should match expected value"
|
||||
);
|
||||
equal(
|
||||
sdr.decryptString(encryptedStrings[i]),
|
||||
decrypted,
|
||||
convertedTestCases[i],
|
||||
"decryptString(encryptString(input)) should return the initial decrypted string value"
|
||||
);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче