Commit Graph

78 Commits (849a4074335a76224dbc6508ef3f971c0f8df985)

Author SHA1 Message Date
Tara Vancil 074bb66a4c Add tests for messages model.
Closes #222
10 years ago
lilia 5a46300581 Reorder database.js include in test 10 years ago
lilia 026f110d36 Delete the database once, before tests run 10 years ago
Tara Vancil d65e0e5eda Add tests for message and conversation models
Closes #218
10 years ago
lilia c526dbda5f Set up production build task
`grunt copy`

Closes #191
10 years ago
lilia 254131488e Render emoji in conversation and inbox views. 10 years ago
lilia 1321a90667 Rename Whisper.View#attributes
Avoid colliding with Backbone.View attributes, which is a list of attrs
to set on the html element for a view.
10 years ago
lilia dc1b09f59d Auto-link urls in message bodies
And watch out for xss.

Closes #187
10 years ago
lilia fc6c8c0f3e Fix tests 10 years ago
lilia 1bb480f6ea DRY up a common view pattern
Define a Whisper.View base class that automatically parses and renders
templates and attributes defined by the subclass. This saves us a good
number of lines of code as well as some marginal memory overhead, since
we are no longer saving per-instance copies of template strings.
10 years ago
lilia 4cefd17ac6 Remove unused view 10 years ago
lilia e96aa2f06e Remove obsolete script tags
For the recently deleted notifications.js
10 years ago
lilia 90140556e4 Fix tests 10 years ago
lilia 711e211e20 Remove bootstrap tagsinput 10 years ago
lilia d107c3b839 Fix tests 10 years ago
lilia 55802f2087 Remove obsolete note on test page
Actually this page totally works from file:// now.
10 years ago
Matt Corallo e7f3e52b6c Remove NaCL! 10 years ago
Matt Corallo 5785f4033c Compile curve25519/webcrypto into libtextsecure.js 10 years ago
Matt Corallo 899d756469 Split tests between libtextsecure and main 10 years ago
Matt Corallo 8ad1a38b5b Move js files around for libtextsecure split 10 years ago
Matt Corallo 444b765dfc Remove unused function in _test.js 10 years ago
Matt Corallo fb03879d02 Re-add v3 testvectors with fixed sauce 10 years ago
lilia 5c2006e159 Fix build: Revert "Update some of the testvectors to v3"
This reverts commit 33429bd6f7.
10 years ago
Matt Corallo 33429bd6f7 Update some of the testvectors to v3 10 years ago
Matt Corallo 2b0866ee1f Bring protocol_test back in-line with new APIs 10 years ago
lilia 3d6c251fd1 Group avatars 10 years ago
lilia d52db8fe6f Render group updates
Not pretty, but it works. Also allows for later localization.
Copy/behavior is borrowed from the Android client.

Closes #104
Fixes #65
10 years ago
Matt Corallo 2d41385369 Remove last \t in crypto_test.js 10 years ago
Matt Corallo 2c781e5b62 s/\t/ /g in test/index.html 10 years ago
Matt Corallo 28aa0a5508 s/\t/ /g in fake_api.js 10 years ago
Matt Corallo 1f8b8cd0ea s/\t/ /g in testvectors.js 10 years ago
lilia 1a4811fcef Fix tests 10 years ago
lilia 4a401f07f3 Rewrite ReplayableErrors
ReplayableErrors make it easy for the frontend to handle identity key
errors by wrapping the necessary steps into one convenient little
replay() callback function.

The frontend remains agnostic to what those steps are. It just calls
replay() once the user has acknowledged the key change.

The protocol layer is responsible for registering the callbacks needed
by the IncomingIdentityKeyError and OutgoingIdentityKeyError.
10 years ago
Daniel Reichert 46ec7c966f Add test coverage of isEqual function 10 years ago
lilia 7b23e24b71 Add stringview license info and script tags
Closes #94
10 years ago
lilia ee0d7edc0b WebSocket-Resources / websocket refactor
This commit provides the javascript complement to
[WebSocket-Resources](https://github.com/WhisperSystems/WebSocket-Resources),
allowing us to use a bi-directional request-response framework over
websockets.

See websocket-resources.js and websocket-resources_test.js
for usage details.

Along the way I also factored the websocket keepalive and reconnect
logic into its own file/wrapper object.
11 years ago
lilia bf22da209f Fix tests 11 years ago
lilia fd3a72d435 Destroy all globals
Well, not *all* globals..
11 years ago
lilia 470346c9c4 Save incoming messages and pass to frontend asynchronously
After a message is saved asynchronsly, fire an event and pass the
message attributes to frontend listeners via the chrome-runtime API.

This behavior is similar to the 'storage' event fired by localStorage.
11 years ago
lilia ced295a630 Move message and conversation storage to IndexedDB
Getting up and running with IndexedDB was pretty easy, thanks to
backbone. The tricky part was making reads and writes asynchronous.
In that process I did some refactoring on Whisper.Threads, which
has been renamed Conversations for consistency with the view names.

This change also adds the unlimitedStorage permission.
11 years ago
Arlo Breault 5638b20046 Expose test results to sauce
* Do what blanket does, adding another level of indirection in the
   reporting.
11 years ago
lilia 94634fc77a Remove nativeclient from test page
Native client won't work on Sauce. Removing for now. TODO: find a
way to gracefully disable native client in the Sauce environment.
11 years ago
Daniel Reichert 6125f7cbbb Add basic test coverage of toArrayBuffer function 11 years ago
lilia b9859ad9d4 Add some license headers 11 years ago
lilia 28290477f4 Nicer timestamps with momentjs
This dependency may be a little heavy for our current use case, but we can
roll with it for now and find something slimmer if it turns out yagni.

Closes #77
Closes #40
11 years ago
lilia 18378d8097 Fold nacl-common into components 11 years ago
lilia db69bacff1 Do fewer string conversions in tests 11 years ago
lilia e190582d9e Build CryptoJS components into webcrypto.js
We only depend on cryptojs for this webcrypto polyfill, so let Grunt
concatenate them into one file.

The reference in the getString helper isn't needed since we use the
built in string converters on CryptoJS's word arrays.
11 years ago
lilia 4518d03f43 Move protocol test to end of suite and extend timeout
The keygen test works without native client, but it takes a loooooong
tiiiiiiime.
11 years ago
lilia 2f58ea5f3a Fixup curve25519 module
Rename methods on the curve25519 interface to be a bit more high level.
Cleanup emscripten wrapper class, wrap long lines and such. Also add a
grunt task alias for building the emscripten compiled curve
implementation.
11 years ago