Commit Graph

480 Commits

Author SHA1 Message Date
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
Philipp von Weitershausen
9cd7080081 Merge bug 618389 from fx-sync. a=blocking-beta8 2010-12-10 21:44:17 -08:00
Philipp von Weitershausen
1149c35812 Bug 618492 - Merge fx-sync to mozilla-central. a=blockers 2010-12-10 16:36:23 -08:00
Philipp von Weitershausen
34accc5e36 Bug 618219 - Merge fx-sync to mozilla-central. a=blockers 2010-12-09 23:21:08 -08:00
Philipp von Weitershausen
1ab5e45f5c Bug 618233 - Temporarily disable random orange on Windows. a=orange 2010-12-09 22:53:08 -08:00
Philipp von Weitershausen
b004ef6f87 Bug 617531 - Merge fx-sync to mozilla-central. a=blockers 2010-12-09 18:26:31 -08:00
Philipp von Weitershausen
32108f1483 Bug 617271 - Merge fx-sync to mozilla-central. a=blockers 2010-12-07 22:43:36 -08:00
Philipp von Weitershausen
ebe5a7b731 Bug 617173 - Merge fx-sync to mozilla-central. a=blocking
--HG--
extra : rebase_source : 1b1700dc4fa35411e02758362e5b881f1621c17c
2010-12-07 13:21:53 -08:00
Philipp von Weitershausen
35a97b22d4 Remerge fx-sync
--HG--
extra : rebase_source : a4b61b8ac50d3abe829a18c304f4e23f0f5a4f2a
2010-12-07 13:20:16 -08:00
Dão Gottwald
373295c3e1 Backed out changesets 4d16d58becaf, 680d3557cafe, 13ea9fc20ed2, 1b2d4ba850a9, 81d8bf53ab01, 3e74c1c15b63, a29a2a0ae764, d2fd62ffd88e, 183be003b312, faa6ce5a0a20, 3ee27049cd1a. a=permaorange 2010-12-07 12:50:55 +01:00
Philipp von Weitershausen
91a27043c9 Bug 617173 - Merge fx-sync to mozilla-central. a=blocking 2010-12-06 23:04:51 -08:00
Philipp von Weitershausen
44c4f1539e Bug 615021 - Merge fx-sync to mozilla-central. a=lotsa-blockers 2010-11-30 20:39:13 -08: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
Philipp von Weitershausen
5a5d879e82 Bug 612381 - Merge fx-sync to mozilla-central. a=blocking-beta8 2010-11-15 14:01:58 -08:00
Philipp von Weitershausen
675f24fc1d Bug 604603 - Merge fx-sync to mozilla-central. a=crashes,orange 2010-10-28 17:32:25 -07:00
Philipp von Weitershausen
7e309ebfe5 Bug 604565 - Disable intermittently failing xpcshell tests on OSX debug builds. r=mconnor a=orange
--HG--
rename : services/sync/tests/unit/head_appinfo.js => services/sync/tests/unit/head_appinfo.js.in
2010-10-21 00:59:05 +02:00
Philipp von Weitershausen
5bb24d494d Bug 604565 - Attempt to make tests hang less on OS X. r=mconnor a=afrosdwilsh
Reduce amount of pointless network calls by not registering any engines for tests that provide their own fake engine implementations anyway.
2010-10-19 00:07:04 +02:00
Philipp von Weitershausen
564088e658 Bug 603388 - Merge fx-sync to mozilla-central. a=blockers
--HG--
rename : services/crypto/WeaveCrypto.js => services/crypto/modules/WeaveCrypto.js
2010-10-15 11:46:02 +02:00
Philipp von Weitershausen
ccda96f21d Merge bug 601973 from fx-sync. a=blocking-beta7 2010-10-05 21:13:00 +02:00
Philipp von Weitershausen
4b8ea85cc0 Bug 601952 - Merge fx-sync to mozilla-central. a=blocking-beta7 2010-10-05 19:11:27 +02:00
Philipp von Weitershausen
fffee366cd Disable tests due to Windows failures (bug 599193) a=bustage-fix 2010-09-24 02:24:42 +02:00
Philipp von Weitershausen
d14f7f7afd Merge fx-sync to mozilla-central (bug 597426) 2010-09-24 00:19:31 +02:00
Philipp von Weitershausen
91f9e720c4 Bug 594506 - Merge fx-sync to mozilla-central 2010-09-15 15:54:35 +02: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
Philipp von Weitershausen
210f20ecd4 Bug 652666 - ltm is not defined in prefs engine. r=rnewman 2011-04-25 22:07:47 -07:00
Philipp von Weitershausen
1f44252a00 Merge mozilla-central to services-central 2011-04-25 09:44:36 -07:00
Richard Newman
474533a259 Bug 652182: eliminate Resource status == 0 check missed in landing of Bug 623080. r=philiKON 2011-04-22 12:13:17 -07:00
Richard Newman
1f647fc550 Bug 651596: eliminate IWeaveCrypto. r=philiKON 2011-04-20 14:27:19 -07:00
Richard Newman
9602015644 Bug 650208: small followups (use add_test, CRYPTO_COLLECTION). r=philiKON 2011-04-19 13:18:15 -07:00
Richard Newman
eef03581ff Bug 650208: fix engine setup test. r=philiKON 2011-04-19 12:57:29 -07:00
Richard Newman
37cec0ea9b Bug 650208: add test for freshStart behavior, improve collection tracking in tests. r=philiKON 2011-04-19 12:56:46 -07:00
Richard Newman
8c8cdf3100 Bug 650208: part 4: upload keys then download them. r=philiKON 2011-04-19 12:35:04 -07:00
Richard Newman
5eb0a7851a Bug 645918: attempt to fix random orange in test_bookmarks_engine. r=philiKON 2011-04-19 12:30:39 -07:00
Richard Newman
a785d1f94a Bug 646910: attempt to fix random orange in test_clients_engine. r=philiKON 2011-04-19 12:03:34 -07:00
Richard Newman
baecb5d75e Merge from mozilla-central to services-central. 2011-04-18 20:05:49 -07:00
Philipp von Weitershausen
195a05f416 Bug 648371 - Convert async tests to use run_next_test helper. r=rnewman 2011-04-18 14:18:36 -07:00
Richard Newman
6e6815e668 Bug 650208: part 2b: clean up basic auth mess in tests. r=philiKON 2011-04-18 13:26:03 -07:00
Richard Newman
b778a7a33c Bug 650208: part 2: augment tests to actually track collections. r=philiKON 2011-04-18 13:25:25 -07:00
Richard Newman
15c78354a1 Bug 650208: part 1: improve printing of record ID mismatches. r=philiKON 2011-04-18 13:25:19 -07:00
Richard Newman
d906518cf3 Bug 650208: part 0: refactor timestamp logic in tests. r=philiKON 2011-04-18 13:25:08 -07:00
Richard Newman
fe7f22191a Bug 649739: send userabort reason for J-PAKE cancelation. r=philiKON 2011-04-14 10:49:54 -07:00
Richard Newman
000314e7f9 Bug 649783: don't attempt to delete client-specific data if Sync doesn't have a cluster URL. r=philiKON 2011-04-13 15:34:58 -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
Robert Sayre
4659902f34 jaegermonkey. what. a=arewefastyet 2010-09-11 15:06:33 -04:00
Robert Sayre
59773ae503 Merge mozilla-central to tracemonkey. 2010-09-10 11:47:11 -04:00
Robert Sayre
357a4a6366 Merge mozilla-central to tracemonkey. 2010-09-01 22:27:07 -07:00
Edward Lee
b89e26e712 Bug 587280 - Intermittent failure in test_crypto_keypair.js | 1624 == 1644 [r=dolske a=npotb]
Check for both 1624 and 1644 length private keys.

--HG--
extra : rebase_source : 9deb4628ef4a60bec06a9adba93c6d77458e8b13
2010-08-31 23:49:41 -07:00
Joel Maher
161d8ae5ae Bug 591325 Fix regression due to relativesrcdir landing in xpchsell test, continued cleanup in chrome tets r=ctalbert a=NPOTB 2010-09-10 10:20:38 -07:00
Luke Wagner
5e9978f911 Bug 581263 - remove slow natives (r=waldo,mrbkap) 2010-08-16 12:35:04 -07:00
Philipp von Weitershausen
5c0030737b Re-merge fx-sync to mozilla-central 2010-08-12 17:03:58 +02:00
Oleg Romashin
b83b1bfc23 Bug 586325 - Maemo5/6 build bustage. qt includes. r=jones.chris.g
--HG--
extra : rebase_source : 8b4ba64d2b20ef250a490b1f1a21eec0dc28d04d
2010-08-11 18:18:41 -07:00
Philipp von Weitershausen
b8eab15274 Bug 590633 - Merge fx-sync to mozilla-central 2010-09-08 03:37:07 +02:00
Paul O’Shannessy
7ebaddc528 Bug 584040 - Fix leaky tests Part 2 [r=mconnor] (CLOSED TREE)
Make sure we explicitly nullify the cached services in the BookmarksStore & BookmarksTracker.
Also, explicitly finalize the statement if it was created.
2010-08-03 19:01:06 -07:00
Philipp von Weitershausen
8cf9d22332 Bug 584170 - Make test_service_cluster.js less prone to timing problems. r=mconnor, CLOSED TREE 2010-08-03 22:20:40 +02:00
Philipp von Weitershausen
1ed6226edd Bug 584040 - Fix leaky tests, r=mconnor 2010-08-03 14:14:08 -04:00
Paul O’Shannessy
bd852fd972 Bug 583830 - Merge fx-sync to mozilla-central 2010-08-03 00:54:53 -07:00
Paul O’Shannessy
690cfa3bdf merge fx-sync to mozilla-central 2010-08-02 23:44:48 -07:00
Paul O’Shannessy
72daea871b Bug 582753 - Merge fx-sync to mozilla-central [r=vlad] 2010-07-28 15:10:51 -07:00
Paul O’Shannessy
f10fef5b32 Bug 577383 - Merge fx-sync to mozilla-central [r=mconnor] 2010-07-07 17:39:40 -07:00
Philipp von Weitershausen
1fe474a0ba Bug 571902 - Land sync and crypto components on trunk [r=mconnor r=ted]
Makefiles and build helpers for 'services'.
2010-06-21 17:05:08 -07: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
Atul Varma
e1f5bf9e13 Oops, forgot to revalidate logs in my last commit. 2008-06-26 17:00:01 -07:00
Atul Varma
df57d1a0fc Fixed a typo, added an explicit check in test_bookmark_syncing. 2008-06-26 16:59:25 -07:00
Atul Varma
b31c786d84 Automated merge with http://hg.mozilla.org/labs/weave 2008-06-26 16:28:55 -07:00
Atul Varma
e0f26c39a3 Added a bookmark sync test that exercises the commandLike() method by adding two identical bookmarks with different GUIDs to different profiles and then syncing. 2008-06-26 16:28:44 -07:00
Dan Mills
c3a7956e61 fix unit test makefile so it works on windows (no symlinks on windows, boo) 2008-06-26 16:09:22 -07:00
Atul Varma
2bd0a8ac17 Refactored some things in the test framework to make tests easier to write, and to make certain things possible to write. 2008-06-26 15:01:34 -07:00
Atul Varma
792f0f7e87 Refactored password sync test to use newly-added functionality in the sync testing infrastructure. 2008-06-26 11:40:14 -07:00
Atul Varma
0e87611a56 Revalidated log for password sync test, which changed due to Thunder's changes that put deltas for individual versions into their own files on WebDAV. 2008-06-26 11:38:40 -07:00
Atul Varma
6e8d38ac08 Refactored client state-changing functions out of test_bookmark_syncing.js and into head.js, as part of the SyncTestingInfrastructure class, so that other test suites can use them. 2008-06-26 11:07:13 -07:00
Atul Varma
cd2f7cdb93 Bookmark sync test now attempts to add a bookmark on the second computer, then re-sync on the first computer and ensure that the bookmark is copied over. 2008-06-25 17:05:20 -07:00
Atul Varma
9beba70275 Added a number of "real" bookmark sync tests; see test_bookmark_syncing.js for information. 2008-06-25 14:30:53 -07:00
Atul Varma
37225f431c Changed AsyncException so that it dynamically subclasses the exception it's wrapping, and adds an 'asyncStack' property to allow access to the asynchronous call stack. This, along with my previous few commits, makes the processing of stack traces in our code much more streamlined, and also allows our debugging output to be more informative, as stack information is now logged from the point at which an exception was thrown, rather than the point at which it was caught.
Also renamed some things in async.js to be more descriptive and easier-to-understand, albeit a bit more verbose.
2008-06-25 04:43:07 -07:00
Atul Varma
9d7f1afc80 Made exception logging routines more informative and added logtests for them. 2008-06-25 00:13:36 -07:00
Atul Varma
b5dc3b878a Added a really, really basic sync test for bookmarks. 2008-06-24 16:55:56 -07:00
Atul Varma
f9ab00520c Separated test_passwords into itself, which contains pure unit tests, and test_password_syncing, which contains a suite that's more along the lines of a system test, though still with plenty of stuff faked-out. fake_login_manager.js contains code shared between the two suites.
--HG--
rename : services/sync/tests/unit/test_passwords.log.expected => services/sync/tests/unit/test_password_syncing.log.expected
2008-06-23 21:21:40 -07:00
Atul Varma
0258487f7a Refactored stuff out of test_passwords and into head.js to make creating new sync tests for different engines easier. 2008-06-23 20:57:10 -07:00
Atul Varma
088eeebfd3 Added some more visibility to the individual steps of test_passwords. 2008-06-23 18:01:48 -07:00
Atul Varma
387927da84 Updated expected log for test_passwords based on recent code changes. 2008-06-23 17:41:01 -07:00
Justin Dolske
6ed3755104 Bug 433949 - Use WeaveCrypto component (NSS) instead of OpenSSL 2008-06-23 16:23:57 -07:00
Atul Varma
ed6f207586 Added 'resync on second computer' step to test_passwords. 2008-06-23 14:45:58 -07:00
Atul Varma
cd6f3ef8d3 Moved the FakeGUIDService from test_passwords.js to head.js. 2008-06-23 14:13:46 -07:00
Atul Varma
9baa177ade A tiny bit more refactoring to test_passwords. 2008-06-20 18:36:33 -07:00
Atul Varma
77a64f448f Oops, forgot to recommit the canonical log for test_passwords in my last commit. 2008-06-20 18:36:11 -07:00
Atul Varma
7e429a9eba Fake GUID generator now provides a different yet deterministic GUID upon each invocation. 2008-06-20 18:25:21 -07:00
Atul Varma
fd24f3706a test_passwords now also removes a user after doing everything else. 2008-06-20 18:04:59 -07:00
Atul Varma
01b47a4865 Factored out the fake filesystem related functions in test_passwords.js into a FakeFilesystemService class in head.js. 2008-06-20 17:47:32 -07:00
Atul Varma
0d27ee6f89 Refactored test_passwords to make it more modular and readable, changed the formatting of some log messages to be more descriptive. 2008-06-20 15:39:07 -07:00
Atul Varma
4c78f8d170 Improved test_passwords so that it syncs, re-syncs, adds a new user, and re-syncs again.
Fixed a strict warning in engines.js.
2008-06-20 14:22:06 -07:00
Atul Varma
4e39258260 Made the tracking of async generators/coroutines more robust for debugging purposes.
Refactored code	in syncCores.js	to use Utils.makeTimerForCall().

Improved test_passwords to perform an additional sync after the initial one.
2008-06-20 13:58:56 -07:00
Atul Varma
2f9945b9d3 Added more informative output for fake DAV, so that log-based tests are both more self-documenting re: Weave's behavior and serve as more robust test cases. 2008-06-20 12:49:25 -07:00
Atul Varma
a39acd2449 Added an expected-log for the passwords sync engine unit test. 2008-06-20 12:39:50 -07:00
Atul Varma
32c7be2a6f Changed log level in a unit test. 2008-06-20 12:24:02 -07:00
Atul Varma
ea744597ab Modified the way logging works in unit testing; fake testing components now log as part of the 'Testing' logger instead of the root logger. 2008-06-19 17:04:04 -07:00
Atul Varma
93520a6e78 Added more fake prefs to the password test to eliminate strict warnings, added logging code to identity.js to aid in debugging. 2008-06-19 16:03:42 -07:00
Atul Varma
6046183cfa Finished test_passwords.js, although it raises a number of strict warnings. 2008-06-18 18:08:33 -07:00
Atul Varma
920bb46e7c Fixed a preference typo in test_service.js. 2008-06-18 17:33:44 -07:00
Atul Varma
251f02b0f0 test_passwords.js now performs a fake sync, but I ran into an issue that may be a bug in remote.js. 2008-06-18 17:28:28 -07:00
Atul Varma
7829070424 Refactoring; moved code out of test_service.js and into unit/head.js for use by other tests. 2008-06-18 16:51:54 -07:00
Atul Varma
e9670abd3f Added a new property to async.js, Async.outstandingGenerators, which returns the number of generators that haven't yet been finalized. This can be used for diagnostic purposes to determine whether generators haven't yet been called back. 2008-06-18 16:11:15 -07:00
Atul Varma
30046913d8 Refactored some file operations into a new function in Utils and out of engines.js. 2008-06-18 14:12:24 -07:00
Atul Varma
22a628bfea Moved XPCOM-specific stuff from engines/passwords.js to util.js so they could be easily stubbed-out by unit tests. 2008-06-18 11:54:24 -07:00
Atul Varma
90d243db16 Refactored test_service and module code so that the weave service constructor is called, and auth is done more accurately. 2008-06-17 19:54:09 -07:00
Atul Varma
945a8b782a The manage.py test-runner now compares expected results to actual results if a '<test-name>.log.expected' file exists in the test directory; if they don't match, a unified diff is displayed. Note that this is only done via manage.py, it's not currently implemented in the Makefile test framework because makefiles make me barf. 2008-06-17 12:04:40 -07:00
Atul Varma
a6cca49fc3 Added a fake preference service to test_service. 2008-06-17 11:45:13 -07:00
Atul Varma
b0ca747fe2 Added test_service, which currently tests the case in which the server's meta/version and private/privkey files are correct, as well as all authentication information. 2008-06-16 18:08:37 -07:00
Atul Varma
8d40fc280b Refactored test suites based on recent changes. 2008-06-16 16:53:53 -07:00
Atul Varma
459e94fa97 Factored out fake-timer code into a separate class and moved it to head.js. 2008-06-16 16:42:32 -07:00
Atul Varma
de38af3819 Refactored head.js for unit tests so that we now have an 'initTestLogging()' function. 2008-06-16 16:22:00 -07:00
Atul Varma
2675855ed4 Defined Cu -> Components.utils in head.js so that test files don't have to put it in as boilerplate. 2008-06-16 14:06:05 -07:00
Atul Varma
78c2bba04d Added test_async_missing_yield. It's very messy right now and duplicates code from other tests, but I've got some ideas about how to write better tests for async ops that I'll commit soon. 2008-06-11 18:02:46 -07:00
Atul Varma
d32ba01952 Modified test_async_exceptions to use a fake nsiTimer. 2008-06-11 17:10:39 -07:00
Atul Varma
561d94aa66 Added a unit test for async exceptions. 2008-06-11 16:38:22 -07:00
Atul Varma
9c1413e024 Factored out all the logging+async setup code from test_sharing.js into a new global function, makeAsyncTestRunner(), which turns an async.js-style generator into a unit test. 2008-06-09 20:51:23 -07:00
Atul Varma
9cc4da48c1 Refactoring: made a new function, Utils.makeTimerForCall(), which is used by test suites and async.js. 2008-06-09 19:30:11 -07:00
Atul Varma
98a85cbd23 Refactorings to test_sharing.js to make it use the async do_test_pending()/do_test_finished() calls. 2008-06-09 19:18:14 -07:00
Atul Varma
2905492e20 Added modules/sharing.js, which provides access to the RESTful sharing API, and a unit test suite. The unit test suite is pretty heinous right now and should get a bit of refactoring. 2008-06-09 18:55:26 -07:00
Atul Varma
3bb8a88ccf Added more tests to test_async.js and documented them a bit. 2008-06-07 00:34:33 -07:00
Atul Varma
ce74084744 Fixed an inaccuracy in the async.js test suite. 2008-06-07 00:22:57 -07:00
Atul Varma
394167a10a Added a unit test suite for modules/async.js. 2008-06-06 21:40:30 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
12ae1f3d1c Re-disabled test_xmpp_simple.js; it shouldn't be run without a local jabber server (and it wasn't, until I accidentally comitted my local change enabling the test. 2008-06-05 12:18:16 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
a8012cad1d Merged 2008-06-04 20:30:56 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
e578f11c10 The menu icon of a bookmark folder now changes when that folder is being shared out with others. 2008-06-04 20:30:37 -07:00
Dietrich Ayala
406a97aee2 imported patch xmpp-transport-fault-tolerance-and-test 2008-06-04 18:34:37 -07:00
Dietrich Ayala
ecbfb93933 xmpp-stream-error-handling 2008-06-04 17:36:37 -07:00
Dietrich Ayala
3d3869c8a5 [mq]: xmpp-reconnect 2008-06-04 17:00:02 -07:00
Dietrich Ayala
3e4256b313 [mq]: xmpp-disconnect 2008-06-04 14:02:47 -07:00
Dietrich Ayala
6805970f17 [mq]: xmpp-cleanup 2008-06-04 12:14:28 -07:00
Atul Varma
d3d41cc696 Added a basic testing suite for engines/passwords.js. It currently only tests _hashLoginInfo() and PasswordSyncCore._itemExists(). 2008-06-03 18:37:36 -07:00
Atul Varma
ada0204cac Moved all code related to the syncing of cookies--e.g. CookieStore, CookieTracker, CookieEngine, CookieSyncCore--into their own file at modules/engines/cookies.js. I'll be doing the same to the other engines shortly.
This helps with code organization--all the logic for dealing with a particular data type is now in one place--and should also make it easier to write unit/regression tests.
2008-06-03 11:11:44 -07:00
Atul Varma
2271e34077 Added a simple test to test_fault_tolerance.js that wasn't working before, but now is, and I don't know why... 2008-05-30 17:02:25 -07:00
Atul Varma
b9a3944d7e Added a trivial appender to faultTolerance.js. 2008-05-30 16:32:06 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
7ded706053 Fixed broken unit test test_cookie_store.js 2008-05-30 13:52:39 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
e9a097b252 Merged changes 2008-05-30 11:11:02 -07:00
Atul Varma
8b2854d7e6 Added a testing suite for log4moz, along w/ a few refactorings necessary to perform the tests. 2008-05-29 17:56:52 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
6031b5a316 Moved the Share Bookmarks item out of the Weave popup menu into the Bookmarks menu, folder submenu. 2008-05-29 11:17:54 -07:00
Atul Varma
c00c81efab Added a trivial fault tolerance JS module with a trivial test suite. 2008-05-28 11:25:28 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
c8b1c91b51 Created a cookie tracker in trackers.js, and a test for it in tests/unit/test_cookie_store.js. 2008-05-27 09:44:26 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
42f471fcd3 Added unit test file for CookieStore. It has a test to make sure that only persistent cookies are wrapped, not session cookies. 2008-05-23 17:49:58 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
7793fe3db1 Created some documentation of how to add synchronization functionality for a new user data type to Weave. Created a new directory called docs to put this into. 2008-05-19 19:40:45 -07:00
Dan Mills
adb0b31cb6 temporarily disable xmpp unit test 2008-05-12 10:18:20 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
11d82ab309 Created a readme for using the XMPP client module. 2008-05-08 18:50:12 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
7bd1d2d781 Expanded test_xmpp -- currently failing tests but it's got the setup now for timing out and failing if the expected message is not received. 2008-05-07 15:29:42 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b604dfc445 Made a very simple unit test for xmppClient; it's passing, but currently it connects to the hard-coded URL of a jabber server running on localhost; I'll need to change this if other people are going to be able to run this test. 2008-05-06 13:13:26 -07:00
Dan Mills
d205f55def add a simple unit test harness based on xpcshell; add two tests for PBE and to load all the modules; add some hacks to the component's makefile to make tests work correctly 2008-04-30 13:01:17 -07:00