Cable-Desktop/test
lilia a1a528ccdd Finish abstracting native client
Firstly, don't initialize textsecure.nativclient unless the browser
supports it. The mimetype-check trick is hewn from nacl-common.js.

Secondly, nativeclient crypto functions will all automatically wait for
the module to load before sending messages, so we needn't register any
onload callbacks outside nativeclient.js. (Previously, if you wanted to
do crypto with native client, you would have to register a call back and
wait for the module to load.) Now that the native client crypto is
encapsulated behind a nice interface, it can handle all that
onload-callback jazz internally: if the module isn't loaded when you
call a nativeclient function, return a promise that waits for the load
callback, and eventually resolves with the result of the requested
command. This removes the need for textsecure.registerOnLoadCallback.

Finally, although native client has its quirks, it's significantly
faster than the alternative (emscripten compiled js), so this commit
also lets the crypto backend use native client opportunistically, if
it's available, falling back to js if not, which should make us
compatible with older versions of chrome and chromium.
2014-11-09 15:23:23 -08:00
..
views Update message view test 2014-10-29 12:53:54 -07:00
_test.js Refactor crypto.js and native client interface 2014-11-06 04:33:43 -08:00
blanket_mocha.js Fix blanket popup 2014-07-26 19:14:14 -04:00
crypto_test.js Finish abstracting native client 2014-11-09 15:23:23 -08:00
curve25519_compiled_test.js Finish abstracting native client 2014-11-09 15:23:23 -08:00
curve25519_test.js Abstract out curve25519 tests 2014-11-06 14:54:36 -08:00
fake_api.js Clean up test files 2014-10-29 16:05:51 -07:00
helpers_test.js Split crypto_test into crypto, protocol and helpers tests 2014-11-06 14:33:16 -08:00
index.html Finish abstracting native client 2014-11-09 15:23:23 -08:00
nativeclient_test.js Finish abstracting native client 2014-11-09 15:23:23 -08:00
protocol_test.js Finish abstracting native client 2014-11-09 15:23:23 -08:00
protos Add a page for testing views. 2014-09-01 11:52:58 -07:00
test.js Refactor crypto.js and native client interface 2014-11-06 04:33:43 -08:00
testvectors.js Refactor crypto.js and native client interface 2014-11-06 04:33:43 -08:00