aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/BrowserTestExtension/tests/encryptTest.js (follow)
Commit message (Collapse)AuthorAgeFilesLines
* doc: use https:// for www.gnu.orgDaniel Kahn Gillmor2018-10-181-1/+1
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* js: add configuration option on startupMaximilian Krambach2018-09-191-1/+1
| | | | | | | | | | | | | | -- * src/index.js: Added an optional configuration object for the startup. * configuration: timeout - the initial check for a connection ran into timeouts on slower testing machines. 500ms for initial startup is not sufficient everywhere. The default timeout was raised to 1000ms, and as an option this timeout can be increased even further. * BrowsertestExtension: Set the initial connection timeouts to 2 seconds, to be able to test on slower machines.
* js: add testsMaximilian Krambach2018-08-301-2/+43
| | | | | | | | | | | | | -- * BrowserTestExtension/tests: - decryptTest.js: Check Decryption and return values of binary data - encryptTest.js: Return data type of armored/non-armored encryption - added a small encoded input png for testing * DemoExtension/maindemo.js: Fixed unexpected usage of the Demo encrypt (non-armored)
* js: make method parameters objectsMaximilian Krambach2018-08-221-41/+46
| | | | | | | | | | | | -- * As requested by using parties, the options to be passed into the methods are now objects, with the objects' properties better describing what they do, and to avoid the need to type several nulls in a method call if one wants the last parameter. - src/Keyring.js, src/gpgme.js: Changed parameters and their validations - BrowserTest/*.js Had to adapt quite some calls to the new format
* js: add and apply eslint rulesMaximilian Krambach2018-08-201-5/+5
| | | | | | -- * mainly spacing, see .eslintrc.json for details
* js: clean up test extensionMaximilian Krambach2018-07-271-100/+57
| | | | | | | | | | | -- Tests will now run with one instance of gpgmejs each block, which reduces overhead. Readability is (hopefully) improved), some negative tests are added. There is still a performance problem in base64 encoding/decoding, which causes some tests to fail due to time out.
* js: reduce request spam at getKeys()Maximilian Krambach2018-07-091-2/+3
| | | | | | | | | | | | | | | | | | -- * Don't make a secret-Key request for each Key retrieved, use one request for all of them instead, and assemble the info later. This should reduce the traffic with large Keyrings. The bulk retrieval for the public armored Keys for each of these Keys is still up to discussion * unittests: disabled assertion for the armored key (as it currently doesn't work) * encryptTest: clarified the mechanism/reason of rejection for Messages >64 MB. This is still a TODO, as this error comes from a different place (the browser itself) and behaves different from the other errors.
* js: code cleanup (eslint)Maximilian Krambach2018-06-061-53/+60
| | | | | | | | -- * trying to stick to eslint from now on for readability * As some attribution was lost in previous git confusions, I added my name into some of the licence headers
* js: Treat a connection as a gpgme ContextMaximilian Krambach2018-05-281-8/+0
| | | | | | | | | | | | | -- * After an operation a connection should be disconnected again. The "end of operation" is now assumed to be either an error as answer, or a message not including a "more" * GPGME, GPGME_Key, GPGME_Keyring don't require a connection anymore * Message.js: The Message.post() method will open a connection as required
* js: Testing lare messagesMaximilian Krambach2018-05-141-14/+12
| | | | | | | | | | -- * Some assumption on messages were wrong. Now the tests use more reasonable sizes. * bigString now uses the full utf8-extent, with the exception of U+0000. This code gets dropped during the encryption-decryption process.
* js: more testing of nativeMessaging connectionMaximilian Krambach2018-05-091-1/+1
| | | | | | | | | | | | | -- * There were some inconsistencies between utf-8, transfer and browsers' utf16, which broke characters that were split between individual messages. src/Connection now contains a workaround that reassembles javascripts' format from passed base64 strings. This needs someone more experienced looking. * Added several new tests which were failing during initial debugging of this issue * reorganized BrowsertestExtension to avoid cluttering.
* js: more testingMaximilian Krambach2018-05-081-2/+11
| | | | | | | | | | | | -- * Tests: Under certain circumstances, some data change during encrypt-decrypt. Committing the current state so the problem can be discussed. * Fixes: - disconnecting the test ports after tests are complete - fixed passing of the error message from gpgme-json
* js: fixing errors found by testing: encrypt/decryptMaximilian Krambach2018-05-071-14/+100
| | | | | | | | | | | | | | | | | -- * 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.
* js: Added browser testing for unit testsMaximilian Krambach2018-05-031-11/+3
| | | | | | | | | | | -- * Added unittests to be run inside a Browser. To be able to access the non-exposed functions and classes, a testing bundle will be created, containing the tests (unittests.js) and the items to be tested. * src/Helpelpers, src/Key, src/Keyring: fixed some errors found during testing.
* js: more testingMaximilian Krambach2018-04-271-0/+71
-- * Tests: initialization of the two modes, encryption * gpgme.js: reintroduced message check before calling Connection.post() * gpgmejs_openpgp.js: Fixed openpgp mode not passing keys * index.js: fixed some confusion in parseconfig() * Inserted some TODO stubs for missing error handling