aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/BrowserTestExtension/tests/inputvalues.js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-05-07 16:27:25 +0000
committerMaximilian Krambach <[email protected]>2018-05-07 16:27:25 +0000
commit8f3d83e5f0903323ec92f588f60dcecb0ae96de4 (patch)
tree65620180493539aacb6f5368a06f3ba63da19d96 /lang/js/BrowserTestExtension/tests/inputvalues.js
parentjs: fixing errors found by testing (diff)
downloadgpgme-8f3d83e5f0903323ec92f588f60dcecb0ae96de4.tar.gz
gpgme-8f3d83e5f0903323ec92f588f60dcecb0ae96de4.zip
js: fixing errors found by testing: encrypt/decrypt
-- * Key.js: Error code for wrong parameter in createKey should be "PARAM_WRONG" * Helpers.js: The property openpgpjs-like Objects were checked for in toKeyIdArray was not defined. * src/permittedOperations.js: updated more expectations and assumptions for the native API * new Problems: - There seems to be a message size limit of about 21 MB for nativeMessaging, much lower than the documented 4GB. - Some bytes are lost with random data in an encrypt-decrypt roundtrip. The culprit is unclear.
Diffstat (limited to '')
-rw-r--r--lang/js/BrowserTestExtension/tests/inputvalues.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/lang/js/BrowserTestExtension/tests/inputvalues.js b/lang/js/BrowserTestExtension/tests/inputvalues.js
index 1761c82f..3cd1e92a 100644
--- a/lang/js/BrowserTestExtension/tests/inputvalues.js
+++ b/lang/js/BrowserTestExtension/tests/inputvalues.js
@@ -23,6 +23,9 @@ var inputvalues = {
good:{
data : 'Hello World.',
fingerprint : 'CDC3A2B2860625CCBFC5A5A9FC6D1B604967FC40'
+ },
+ bad: {
+ fingerprint: 'CDC3A2B2860625CCBFC5AAAAAC6D1B604967FC4A'
}
},
init: {
@@ -30,3 +33,12 @@ var inputvalues = {
}
};
+
+function bigString(megabytes){
+ let maxlength = 1024 * 1024 * megabytes;
+ let uint = new Uint8Array(maxlength);
+ for (let i= 0; i < maxlength; i++){
+ uint[i] = Math.random() * Math.floor(256);
+ }
+ return new TextDecoder('utf-8').decode(uint);
+}