Commit Graph

178 Commits

Author SHA1 Message Date
Edward Lee
15d82d14a7 Bug 557591 - Add tests for Utils.stackTrace. 2010-05-17 14:17:32 -07:00
Edward Lee
bd4a46d064 Bug 557591 - Add tests for Utils.lazySvc. [r=mconnor]
Add a fake service that definitely won't exist for testing purposes.
2010-05-17 13:46:19 -07:00
Edward Lee
df6b9020d4 Bug 557591 - Add tests for Utils.lazy2/cb.
--HG--
rename : services/sync/tests/unit/test_utils_lazy.js => services/sync/tests/unit/test_utils_lazy2.js
2010-05-17 12:47:29 -07:00
Edward Lee
21c44d9420 Bug 557591 - Add tests for Utils.lazy/cb.
--HG--
extra : rebase_source : 4f2d102f31b2afa8d3c34261b63b344fccef824b
2010-05-17 12:43:20 -07:00
Edward Lee
71cd237b09 Bug 557591 - Add tests for Utils.deferGetSet. 2010-05-14 17:31:24 -07:00
Edward Lee
e914892380 Bug 557591 - Add tests for Utils.anno. 2010-05-10 18:08:52 -07:00
Edward Lee
24f449dae0 Bug 557591 - Add tests for Utils.makeGUID. 2010-05-10 17:22:48 -07:00
Edward Lee
425168f5ce Bug 557591 - Add tests for Utils.notify. 2010-05-10 17:05:50 -07:00
Edward Lee
2ffe2680cd Bug 557591 - Add tests for Utils.lock. 2010-05-10 16:42:04 -07:00
Edward Lee
ddaa666576 Bug 557591 - Add tests for Utils.catch.
--HG--
extra : rebase_source : 545492072668cfb6862dde756506e12cf43d4375
2010-05-10 16:22:32 -07:00
Justin Dolske
75fe297323 Bug 513798 - Rewrite WeaveCrypto in JS. r=mconnor, r=dwitte
--HG--
rename : services/crypto/components/IWeaveCrypto.xpt => services/crypto/IWeaveCrypto.xpt
2010-04-21 19:02:16 -07:00
Edward Lee
084907c53f Bug 550627 - Default reconciliation to server wins for older changed items [r=mconnor]
Save the time the tracker adds a new changed id and use that to compare the age of the record on the server vs the age of the local change to decide if it's server wins or client wins. Fix up various direct uses of changedIDs to use the API and make the save-to-disk lazy to avoid excessive writes. Add a test to make sure addChangedID only increases in time.
2010-04-01 15:54:53 -07:00
Edward Lee
6c104ff79a Bug 552134 - Ensure that keyring/symmetric key haven't been tampered with [r=mconnor]
Store a HMAC with the encrypted symmetric key instead of just the wrapped key and verify that the HMAC matches before unwrapping. Test that normal getting works and a tampered payload/HMAC fails but succeeds on restoring the correct HMAC.
2010-03-25 19:23:44 -07:00
Edward Lee
46632f7ac1 Bug 549638 - Ensure that encrypted payloads haven't been tampered with [r=mconnor r=dolske]
Generate a SHA256 HAMC hex string from the base64 ciphertext and base64 symmetric key. Generate a HMAC key from the symmetric key and cache them together when unwrapping. Refactor the Utils.sha1 to share the same digest code.

--HG--
extra : rebase_source : dae973c62317eb3b738306fc30ea19870555c7df
2010-03-16 16:31:56 -07:00
Edward Lee
1cd3c07303 Bug 548066 - JavaScript strict warning: clientData.js, line 194: reference to undefined property this.clients[id] [r=mconnor]
Get rid of get/setInfo on ClientEngine and ClientStore and expose functions to read/modify client data: stats, clearCommands, sendCommand. Also expose the local client information as local[ID,Name,Type,Commands] and rework the storage to use these instead of trying to keep the JS object clients entry in sync with prefs, etc. Update users of the old interface (service/tabs/chrome) to use the new local*. Set the client type based on app id instead of from each app's overlay.
2010-03-16 16:39:08 -07:00
Edward Lee
7379a71033 Bug 547007 - Use a per-record IV instead of one for each symkey [r=mconnor]
Generate a random IV on every encrypt instead of taking it from the CryptoMeta. Don't bother generating a bulkIV per CryptoMeta.
2010-03-16 16:31:56 -07:00
Edward Lee
6e5b14f642 Bug 547048 - Only allow clients to issue delete records [r=mconnor]
Don't specially serialize/not encrypt delete records and store the deleted flag as part of the cleartext payload.
2010-03-16 16:31:56 -07:00
Edward Lee
e057d3a639 Bug 547049 - Verify that encrypted payloads correspond to the requested record [r=mconnor]
Write the record's id to both .data and .cleartext and check that they match when decrypting.
2010-03-16 16:31:56 -07:00
Edward Lee
28cf762fdd Remove engines from failing load tests now that engines are gone. 2009-12-11 11:32:23 -08:00
Edward Lee
e84feadbdc Update predecessor test to additionally test unsorted bookmark predecessors. 2009-10-13 21:07:32 -07:00
Edward Lee
554e7266d1 Bug 515676 - Allow giving objects to PUT/POST without Filters to avoid stringify([parse(stringify(stringify(obj)))])
Get rid of Filters and automatically JSON.stringify PUT/POST data that aren't strings, so plain Records can be passed in to PUT and POST. This leverages toJSON of Records to provide an object that can be serialized. Fix up client record serialize/deserialize to still escape/unescape non-ASCII.
2009-09-10 11:05:13 -07:00
Edward Lee
e1afea8a88 Remove mostly unused FaultTolerance service and fix up remaining references. 2009-08-31 17:17:20 -07:00
Edward Lee
d439ae6ca8 Bug 512457 - Report errors before they get eaten up by runInBatchMode
Save the exception from inside runBatched and not have runInBatchMode return failure, so we can then expose the exception.
2009-08-31 16:28:00 -07:00
Edward Lee
f03e1375ea Bug 512637 - Use newlines instead of JSON collection for incremental parsing. r=thunder
Switch to newline mode when using a collection record handler, and look for newlines! Easy! Update test to provide newline-separated strings instead of JSON.
2009-08-26 18:09:41 -07:00
Edward Lee
771c9805e7 Bug 511746 - Resource.foo shouldn't throw except in exceptional cases. r=thunder
Get rid of lastChannel and return a String object from _request with additional properties of status, succeeded, headers -- even if the response was handled by cache. Update engines to check for non-success and throw the failure. Update tests to use these additional properties instead of lastChannel, etc.
2009-08-26 15:32:46 -07:00
Edward Lee
012ffa961f Handle holes in bookmark folders and fix up bookmarks to be at an earlier position if a hole was detected. 2009-08-19 19:32:05 -07:00
Edward Lee
15fa5bc3d6 Add tests to make sure bookmarks are in the right position after creating/updating. 2009-08-19 18:15:12 -07:00
Edward Lee
ed4fe0e311 Share the logging _ code for tests. 2009-08-19 18:01:06 -07:00
Edward Lee
c68e2d8159 Bug 507691 - Server responds with json decode failure for fat unicode characters
Make sure we generate ASCII data for upload by escaping on serialize and unescaping on deserialize. Test to make sure serialized data is ASCII and the original records aren't modified by serialize.
2009-08-06 11:28:33 -07:00
Anant Narayanan
96db27a500 WinCE crypto binary (bug #487171) 2009-07-28 17:14:52 -07:00
Anant Narayanan
0470244603 Backed out changeset 9e8936813ae1 2009-07-28 17:13:15 -07:00
Anant Narayanan
d014c20001 WinCE crypto binary 2009-07-28 16:54:24 -07:00
Edward Lee
c352d7c2db Add i86pc machine detection for crypto Makefile. Add SunOS for test Makefiles. 2009-07-26 02:55:38 -07:00
Edward Lee
c1fd17eceb Bug 505940 - Unnecessarily uploading records on first sync
Remove short-circuit logic of comparing number of keys for deepEquals and iterate through each key on both objects to make sure both have the same value.
2009-07-22 23:49:15 -07:00
Edward Lee
ac355ae207 Bug 485573 - Fennec runs out of memory and crashes if too many history items to sync. r=thunder
Incrementally process records as the collection finds record boundaries and converts them to records for the engine to use. Get rid of the collection iterator and original RecordParser. Add tests for incremental record parsing and remove old iter tests.
2009-07-22 16:38:34 -07:00
Anant Narayanan
26a5b6bd9b Expose rewrapPrivateKey & verifyPassphrase (bug #505401) 2009-07-21 15:02:30 -07:00
Anant Narayanan
5ccbee5ebe Backed out changeset 5768a19f21d3 (crypto review not done yet) 2009-07-21 14:32:57 -07:00
Anant Narayanan
98dab3d018 Crypto changes
--HG--
extra : rebase_source : 0a953a43c01b95e7c467ec4ca7feeb0aaa00f5e1
2009-07-21 11:18:29 -07:00
Mike Connor
62cb8fcc34 move password tests to need-work because they've been broken for a year
--HG--
rename : services/sync/tests/unit/test_passwords.js => services/sync/tests/unit/need-work/test_passwords.js
2009-07-16 11:51:10 -04:00
Edward Lee
f071400c36 merge weave. resolve Makefile storage_version changes. 2009-07-14 19:23:15 -07:00
Edward Lee
c1367f888b Bug 504212 - Have javascript stack traces show [object Object] for various CryptoWrapper functions
Also update createKeypair for keys to pass around the passphrase object and update the tests to pass around an object.
2009-07-14 19:04:32 -07:00
Mike Connor
43f1bba83b fix tests 2009-07-11 02:30:37 -04:00
Mike Connor
eabe55a895 arglebargle 2009-07-11 01:20:45 -04:00
Edward Lee
ee3c44ba86 Remove async and wrap from test_load_modules. 2009-07-09 13:58:19 -07:00
Edward Lee
8fd525f317 merge weave. resolve comments added to resource.js. 2009-07-09 11:21:20 -07:00
Dan Mills
432b95d30f switch from autogenerated load-module tests to a single test that loads all modules 2009-07-01 11:51:52 -07:00
Edward Lee
baa6609a31 merge weave. resolve addition of kSpecialIds to bookmarks.js near removal of Async.sugar. 2009-06-23 22:34:57 -07:00
Edward Lee
ce951c538a Bug 493816 - Timestamps need to be saved as string prefs
Internally store .lastSync as a string but keep exposing set/getters as float values. parseFloat takes both strings and numbers and gives a number.

--HG--
extra : rebase_source : b657dd3f732b9f3b3b0ef208ee53e799aa87d2c6
2009-06-16 17:22:59 -07:00
Edward Lee
7b791f5626 Remove some async related code in head.js. 2009-06-09 14:48:49 -05:00
Edward Lee
026c0a663a Convert test_auth_manager to sync. 2009-06-09 14:39:45 -05:00