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