Edward Lee
80423cab37
Bug 557591 - Add tests for Utils.sha1.
2010-06-01 11:59:21 -07:00
Edward Lee
8d2951b399
Bug 557591 - Add tests for Utils.anno with invalid uris.
2010-06-01 11:30:11 -07:00
Edward Lee
89f3d54c0f
Bug 568518 - Unhelpful log messages [r=mconnor]
...
Remove "Server attack" from exceptions.
2010-05-27 11:04:30 -07:00
Edward Lee
4d78de7c1b
Add tests for Utils.jsonSave and Utils.jsonLoad.
2010-05-20 18:03:19 -07:00
Edward Lee
7905ede039
Bug 557591 - Add tests for Utils.makeURI.
2010-05-19 09:40:45 -07:00
Edward Lee
e241252a4e
Bug 557591 - Add tests for Utils.sha256HMAC.
2010-05-18 13:40:12 -07:00
Edward Lee
7c019e0309
Bug 557591 - Add tests for Utils.stackTrace.
2010-05-17 14:17:32 -07:00
Edward Lee
7befe92e24
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
d54124209a
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
247c43e425
Bug 557591 - Add tests for Utils.lazy/cb.
...
--HG--
extra : rebase_source : 4f2d102f31b2afa8d3c34261b63b344fccef824b
2010-05-17 12:43:20 -07:00
Edward Lee
cdf7defc20
Bug 557591 - Add tests for Utils.deferGetSet.
2010-05-14 17:31:24 -07:00
Edward Lee
36f17f2c20
Bug 557591 - Add tests for Utils.anno.
2010-05-10 18:08:52 -07:00
Edward Lee
310f605d46
Bug 557591 - Add tests for Utils.makeGUID.
2010-05-10 17:22:48 -07:00
Edward Lee
0e5816ef90
Bug 557591 - Add tests for Utils.notify.
2010-05-10 17:05:50 -07:00
Edward Lee
c61020e275
Bug 557591 - Add tests for Utils.lock.
2010-05-10 16:42:04 -07:00
Edward Lee
ff586e08e3
Bug 557591 - Add tests for Utils.catch.
...
--HG--
extra : rebase_source : 545492072668cfb6862dde756506e12cf43d4375
2010-05-10 16:22:32 -07:00
Justin Dolske
661389fa2f
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
3b4aa0220d
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
ba60f514a6
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
e5bce4658d
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
21f7747109
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
e73dbf06b9
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
177b122960
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
6c37148ae4
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
4bdfeb9b77
Remove engines from failing load tests now that engines are gone.
2009-12-11 11:32:23 -08:00
Edward Lee
0be8c60c74
Update predecessor test to additionally test unsorted bookmark predecessors.
2009-10-13 21:07:32 -07:00
Edward Lee
b0c3b9005e
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
e633a4dcea
Remove mostly unused FaultTolerance service and fix up remaining references.
2009-08-31 17:17:20 -07:00
Edward Lee
c70241b5ce
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
b8e1f6aad3
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
009411f482
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
c4393b5e3b
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
4bb37a06d2
Add tests to make sure bookmarks are in the right position after creating/updating.
2009-08-19 18:15:12 -07:00
Edward Lee
6b910e2590
Share the logging _ code for tests.
2009-08-19 18:01:06 -07:00
Edward Lee
8a14a4dfd4
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
45673ccb67
WinCE crypto binary (bug #487171 )
2009-07-28 17:14:52 -07:00
Anant Narayanan
a79e153fb9
Backed out changeset 9e8936813ae1
2009-07-28 17:13:15 -07:00
Anant Narayanan
7a7c271cd7
WinCE crypto binary
2009-07-28 16:54:24 -07:00
Edward Lee
a14ea8d26f
Add i86pc machine detection for crypto Makefile. Add SunOS for test Makefiles.
2009-07-26 02:55:38 -07:00
Edward Lee
39607ef7b9
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
a26f0b1166
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
3541ab1269
Expose rewrapPrivateKey & verifyPassphrase (bug #505401 )
2009-07-21 15:02:30 -07:00
Anant Narayanan
0697eb1f5c
Backed out changeset 5768a19f21d3 (crypto review not done yet)
2009-07-21 14:32:57 -07:00
Anant Narayanan
1509f1d1cb
Crypto changes
...
--HG--
extra : rebase_source : 0a953a43c01b95e7c467ec4ca7feeb0aaa00f5e1
2009-07-21 11:18:29 -07:00
Mike Connor
6ccbc1e360
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
e0f49d8631
merge weave. resolve Makefile storage_version changes.
2009-07-14 19:23:15 -07:00
Edward Lee
b935178671
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
0d4506ba23
fix tests
2009-07-11 02:30:37 -04:00
Mike Connor
44bd8a8cb4
arglebargle
2009-07-11 01:20:45 -04:00
Edward Lee
f3b15e11d4
Remove async and wrap from test_load_modules.
2009-07-09 13:58:19 -07:00
Edward Lee
5c482eea0d
merge weave. resolve comments added to resource.js.
2009-07-09 11:21:20 -07:00
Dan Mills
7626f0f740
switch from autogenerated load-module tests to a single test that loads all modules
2009-07-01 11:51:52 -07:00
Edward Lee
84c52a6411
merge weave. resolve addition of kSpecialIds to bookmarks.js near removal of Async.sugar.
2009-06-23 22:34:57 -07:00
Edward Lee
ad5f01ba04
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
f69797ec49
Remove some async related code in head.js.
2009-06-09 14:48:49 -05:00
Edward Lee
1cd1e7d94e
Convert test_auth_manager to sync.
2009-06-09 14:39:45 -05:00
Edward Lee
df224f04d6
Remove test_async* tests.
2009-06-09 14:34:27 -05:00
Edward Lee
cec8cdb5a2
Convert test_records_crypto to sync.
2009-06-09 14:33:45 -05:00
Edward Lee
f5f6e22061
Convert test_records_keys to sync.
2009-06-09 14:31:26 -05:00
Edward Lee
735531e432
Convert test_records_wbo to sync.
2009-06-09 14:28:37 -05:00
Edward Lee
713f08cf64
Convert test_resource to sync.
2009-06-09 14:25:55 -05:00
Dan Mills
dc43c004a6
fix keys test to work with latest key structure + nsIChannel
2009-06-05 11:23:31 -07:00
Dan Mills
889ac9b203
partially revert d6cac1e80da9 - use id from the body; add additional tests to catch more errors
2009-06-05 10:39:51 -07:00
Dan Mills
384f5493c2
fix wbo record test, expand to use record manager as well
2009-06-04 15:29:31 -07:00
Edward Lee
6ef632b80e
Add test for Utils.deepEquals
2009-05-19 14:24:26 -05:00
Edward Lee
4f6ebe6be5
Bug 481741 - Switch to JSON from nsIJSON
2009-03-31 14:09:38 -05:00
Myk Melez
e54cec2631
bug 476539: use a XULRunner-based test harness for unit testing; r=thunder
2009-03-20 00:14:21 -07:00
Edward Lee
a45ed6623b
Bug 482178 - Clean up services -> lazy services. r=thunder
2009-03-10 06:30:30 -05:00
Myk Melez
fca1820177
bug 475855: make the test_auth_manager and test_resource tests work again with recent changes to the Resource object
2009-01-28 17:51:23 -08:00
Dan Mills
ff240dd3ce
add clients sync (list of clients with names and types); make it simpler to create Engine subclasses; remove the 2nd 'authenticator' parameter for Resources; resetServer is now wipeServer; consider 0 an invalid place ID (fixes bug when calculating item depths); add a Svc global exported from utils.js where commonly used services can live
2009-01-06 13:54:18 -08:00
Siddharth Agarwal
9c564f7526
bug 467085 log4moz updateParents messed up, doesn't support multilevel parenting properly, r=thunder
2008-12-02 21:42:20 +05:30
Dan Mills
00fdbf86d6
move non-working unit tests into subfolders so that 'make' works again. the non-working tests will need some major re-writing due to the move away from webdav
2008-12-02 16:48:07 -08:00
Dan Mills
497743cb82
some small key record fixes; avoid causing indirect login manager queries in the Identity constructor; fix wbo, keys, crypto record unit tests
2008-12-02 14:26:18 -08:00
Dan Mills
b12787f2f2
crypto changes: private keys get their own iv and salt, crypto meta records get a separate iv and no salt. various fixes in crypto code and other wbo related objects. fix crypto tests to match.
2008-11-08 02:00:33 -08:00
Dan Mills
4601fb9d3f
url -> uri
2008-11-06 17:38:35 -08:00
Dan Mills
d3af90034a
hg merge
2008-11-03 15:02:00 -08:00
Dan Mills
e94731682b
add http js server for unit tests; add tests for resources, auth manager, base weave record types (WBOs, keys, crypto wrappers/crypto meta)
2008-11-03 14:41:39 -08:00
Dan Mills
cd1ef1bdc0
disable sharing test
2008-10-16 12:31:27 -07:00
Dan Mills
75326713c1
Bug 443489: use the correct cookie xpcom interface
2008-10-16 12:29:21 -07:00
Dan Mills
ffdc89548f
login code refactoring
2008-07-11 17:40:52 -07:00
Atul Varma
33c970ec5e
If an exception is raised by a notification button callback, it is now logged. Also added a unit test for this new behavior.
2008-07-08 16:50:59 -07:00
Atul Varma
e04369a218
Modified sharing.js to obey the new sharing api.
2008-06-30 23:36:00 -07:00
Atul Varma
63d8b214f5
Fixed a todo in test_bookmark_sharing, still more left to do as jono's modifications to the bookmark sharing API change.
2008-06-30 19:27:39 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
dae06b83f1
Added test_bookmark_sharing to version control; note this doesn't pass right now (and in fact the main test is commented out.)
2008-06-30 18:50:06 -07:00
Atul Varma
7512505bb7
Added a Service.verifyPassphrase() method. Also, Service.login() now checks to ensure that the user's passphrase is valid, and if it's not, it throws an exception.
2008-06-30 16:50:19 -07:00
Atul Varma
4c44bcd581
Fixed a potential bug in Service.login() whereby a user's directory wouldn't be created if it didn't exist (though it would in Service.verifyLogin(), which is only called from the setup wizard).
2008-06-30 15:54:15 -07:00
Atul Varma
3e6bb56f61
Moved isPassphraseValid() out of its test suite and into the crypto module.
2008-06-30 14:40:11 -07:00
Atul Varma
e48513ec01
test_passphrase_checking now actually tests real code and shows that it works. Still have to move isPassphraseValid() into a different place though, probably crypto.
2008-06-30 14:29:26 -07:00
Atul Varma
0ce0311316
Removed test_loadall.js, as its need is obviated by the auto-generated js module loader tests.
2008-06-30 13:37:31 -07:00
Atul Varma
a8d63804d6
Revalidated test logs, as 'actual changes for server' details are no longer being logged.
2008-06-30 13:32:13 -07:00
Anant Narayanan
6dde744f06
Update tests to reflect changes in store/syncCore methods
2008-06-30 12:31:02 -07:00
Atul Varma
1b82e736e0
Updated test_passphrase_checking
2008-06-30 11:54:10 -07:00
Atul Varma
688dcddb1c
Refactored test_service a bit to use the synctestinginfrastructure.
2008-06-30 11:24:58 -07:00
Atul Varma
76a60f1dfe
Added a test_passphrase_checking test suite to test passphrase checking code; it's not yet complete.
2008-06-30 11:18:16 -07:00
Justin Dolske
777c82cf0b
Fix crypto component to not mangle certain strings when doing 8/16 bit character conversion.
2008-06-29 20:51:22 -07:00
Justin Dolske
74d8b0e43a
Partial bustage fix: test was broken, is now less broken but still fails.
2008-06-29 16:46:59 -07:00
Atul Varma
52e47aeb5b
Revalidated logtest files, just a formatVersion change from 2 to 3.
2008-06-26 18:26:07 -07:00
Atul Varma
b35bbe0a4b
Fixed test_service.
2008-06-26 18:09:53 -07:00
Atul Varma
29f7b89a5a
Implemented DELETE and listFiles on fake DAV so that test_service doesn't raise an exception.
2008-06-26 17:48:39 -07:00
Atul Varma
44b8be12aa
Added more assertion checks in test_bookmark_syncing.
2008-06-26 17:31:57 -07:00