diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /security/manager/ssl/tests/unit/test_oskeystore.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'security/manager/ssl/tests/unit/test_oskeystore.js')
-rw-r--r-- | security/manager/ssl/tests/unit/test_oskeystore.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/security/manager/ssl/tests/unit/test_oskeystore.js b/security/manager/ssl/tests/unit/test_oskeystore.js index fcc9de6c59..9efcaa69a6 100644 --- a/security/manager/ssl/tests/unit/test_oskeystore.js +++ b/security/manager/ssl/tests/unit/test_oskeystore.js @@ -51,8 +51,9 @@ async function encrypt_decrypt_test() { // Decrypting should give us the plaintext bytes again. try { let plaintext = await keystore.asyncDecryptBytes(LABELS[0], ciphertext); - ok( - plaintext.toString() == text.toString(), + Assert.equal( + plaintext.toString(), + text.toString(), "Decrypted plaintext should be the same as text." ); } catch (e) { @@ -102,8 +103,9 @@ add_task(async function () { await keystore.asyncRecoverSecret(LABELS[0], recoveryPhrase); let plaintext = await keystore.asyncDecryptBytes(LABELS[0], ciphertext); - ok( - plaintext.toString() == text.toString(), + Assert.equal( + plaintext.toString(), + text.toString(), "Decrypted plaintext should be the same as text." ); @@ -166,8 +168,9 @@ add_task(async function () { await keystore.asyncRecoverSecret(LABELS[0], recoveryPhrase); let plaintext = await keystore.asyncDecryptBytes(LABELS[0], ciphertext); - ok( - plaintext.toString() == text.toString(), + Assert.equal( + plaintext.toString(), + text.toString(), "Decrypted plaintext should be the same as text (once we have the original key again)." ); @@ -204,8 +207,9 @@ add_task(async function () { await keystore.asyncRecoverSecret(LABELS[0], newRecoveryPhrase); let plaintext = await keystore.asyncDecryptBytes(LABELS[0], ciphertext); - ok( - plaintext.toString() == text.toString(), + Assert.equal( + plaintext.toString(), + text.toString(), "Decrypted plaintext should be the same as text (once we have the new key again)." ); |