Atul Varma
361206ff0d
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-26 16:28:55 -07:00
Atul Varma
d80752f41a
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
Atul Varma
f8137c67c5
Added an additional check in stores.js to prevent a strict warning from appearing.
2008-06-26 16:27:54 -07:00
Dan Mills
f07cb3970d
when we abort a lock request because we already hold a token, reset _lockAllowed to allow further requests for locks
2008-06-26 16:26:14 -07:00
Dan Mills
69080714d8
fix unit test makefile so it works on windows (no symlinks on windows, boo)
2008-06-26 16:09:22 -07:00
Dan Mills
155392214f
merge upstream changes
2008-06-26 15:37:55 -07:00
Dan Mills
a70940d45f
disabling password sync by default due to bug 438356
2008-06-26 15:37:30 -07:00
Chris Beard
90e662ce43
adding EULA that will be displayed and must be agreed to on first run
2008-06-26 18:37:05 -04:00
Justin Dolske
1b1d0f308a
Use statically-sized stack buffers to fix building on Windows.
2008-06-26 15:22:48 -07:00
Atul Varma
773399e36a
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-26 15:02:08 -07:00
Atul Varma
6cb9821bbd
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
Anant Narayanan
981d2f0a46
Add license headers to all files which didn't have them.
2008-06-26 14:49:01 -07:00
Dan Mills
333d044200
tone down tab engine debugging output a bit
2008-06-26 14:34:32 -07:00
Dan Mills
909d679020
fix comment in verifyLogin
2008-06-26 14:30:38 -07:00
Dan Mills
2873c5b700
check login status code in service's verifyLogin; attempt to create user directory when it's a 404
2008-06-26 12:27:54 -07:00
Dan Mills
434f582257
merge upstream changes
2008-06-26 12:23:07 -07:00
Dan Mills
76c7dbd4f1
return http status code from dav's checkLogin
2008-06-26 12:22:19 -07:00
Dan Mills
c3a7096c74
disable bookmarks sharing & xmpp for developer release
2008-06-26 12:21:25 -07:00
Maria Emerson
b07cfbf417
added text (not final), changed background, some code clean-up, todo: more code clean-up, fix large buttons (they are ugly)
2008-06-26 12:09:28 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
8bcf41653e
For developer release, made bookmark sharing and xmpp preferences default to false
2008-06-26 12:07:38 -07:00
Atul Varma
0dfa48971f
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-26 11:40:24 -07:00
Atul Varma
24bfe869f6
Refactored password sync test to use newly-added functionality in the sync testing infrastructure.
2008-06-26 11:40:14 -07:00
Atul Varma
49ad3beeab
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
Anant Narayanan
22d4f11f65
Automated merge
2008-06-26 11:16:02 -07:00
Anant Narayanan
b580a586dc
Prevent multiple lock requests from being executed (bug 441922, r=thunder)
2008-06-26 11:15:02 -07:00
Atul Varma
f041c5a9a5
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
Justin Dolske
7464b11b4c
bustage fix: call this.foo(), not foo().
2008-06-25 18:32:59 -07:00
Anant Narayanan
19b2afb2b9
Remove runCmd and other openssl related stuff we no longer need. (bug 441898, r=thunder)
2008-06-25 17:10:24 -07:00
Anant Narayanan
5d79a9825c
Handle removeCommand in FormEngine correctly. (bug 441874, r=thunder)
2008-06-25 17:09:18 -07:00
Atul Varma
6c35a6610e
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-25 17:05:25 -07:00
Atul Varma
afa9d50b44
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
Anant Narayanan
bcb6631187
Branch merge
2008-06-25 16:34:50 -07:00
Anant Narayanan
040f3d1db5
Change default server URL to services.mozilla.com
2008-06-25 16:34:28 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
10287a32be
Merged
2008-06-25 15:55:13 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
465dd3b407
Set up bookmarkEngine._incomingShareOffer to use Myk's new Notification stuff to offer a notification to the user, asking them to accept or reject the incoming share.
2008-06-25 15:54:33 -07:00
Maria Emerson
bd10f4a9dd
fixed interaction details, all login/verify cases work correctly, final screen creates account and syncs correctly
2008-06-25 15:44:35 -07:00
Atul Varma
93d091cbd9
Added a number of "real" bookmark sync tests; see test_bookmark_syncing.js for information.
2008-06-25 14:30:53 -07:00
Myk Melez
d187376a75
bug 436636: a system for showing various kinds of notifications in one consolidated location
2008-06-25 13:51:39 -07:00
Myk Melez
c11c1547c2
the tabs engine needs a constant
2008-06-25 13:51:32 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5a96cc26b0
The share/stop sharing menu item is now added only to normal bookmark folders: Not to the main bookmark menu or to magic folders like 'recently tagged' or whatever.
2008-06-25 11:58:04 -07:00
Atul Varma
434d0a77bf
Another automated merge. I'm kind of confused at this point, so I hope I'm not breaking anything by mis-merging.
2008-06-25 04:45:22 -07:00
Atul Varma
089a4f6a9d
Automatic merge.
2008-06-25 04:44:25 -07:00
Maria Emerson
bab9cb62c9
fix login calls, do login and sync on final screen, add try again link to server errors throughout
2008-06-25 04:43:13 -07:00
Atul Varma
2e2db69479
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
Myk Melez
0e87884e99
bug 441446: set mozBackgroundRequest on XMPP request object when created rather than when used, since it only needs to be set once
2008-06-25 01:56:17 -07:00
Justin Dolske
678aa99626
Split account verification out from login(), make wizard work for using an existing account, related code cleanup/simplification
2008-06-25 00:22:53 -07:00
Atul Varma
323d7df694
Made exception logging routines more informative and added logtests for them.
2008-06-25 00:13:36 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
3b57cacd79
Merged
2008-06-24 21:15:23 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
92fd12fed8
Moved all of the bookmark-share stuff out of the bookmarkEngine class into a new BookmarksSharingManager class.
2008-06-24 21:15:14 -07:00
Atul Varma
130d3dbbe7
Fixed something that I should've changed in my last commit; also removed a call to Utils.stackTrace() that shouldn't have been made.
2008-06-24 19:58:50 -07:00
Justin Dolske
8dae69c9e8
Bustage fix: frame.filename can be null, and the async stack dump can then fail (which causes other problems)
2008-06-24 19:39:58 -07:00
Atul Varma
d0b90b39c3
Renamed AsyncException.trace and Generator.trace to AsyncException.traceback and Generator.traceback, respectively, to distinguish them from Logger.trace() and also explicitly indicate their noun-like nature (since they're properties).
2008-06-24 19:15:54 -07:00
Atul Varma
e9ba6b88d2
Renamed the global trace() function in async.js to traceAsyncFrame(), to avoid confusing it with Logger.trace(), AsyncException.trace, and Generator.trace, all of which are also used in that file.
2008-06-24 19:08:35 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
ce3ae0b557
Moved the folder name and annotation for the incoming shares root folder to string constants.
2008-06-24 18:38:29 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
d127999403
Merged
2008-06-24 18:28:26 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
ff23d2ce9d
Fixed all the places where I was accidentally calling it incomingShareAnno instead of incomingSharedAnno (note the missing letter d). Same for outgoingSharedAnno.
2008-06-24 18:28:01 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
cc4a591a95
Removed all uses of the 'weave/mounted-shares-id' annotation, since it's been made obsolete by INCOMING_SHARED_ANNO.
2008-06-24 18:23:43 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
239839244f
Changes in the annotations relevant to incoming/outgoing share folders are now handled by editCommands in the syncCore.
2008-06-24 18:15:17 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
0de75a4e1a
Annotations on incoming and outgoing share folders are now wrapped for sync, and handled on incoming createCommands.
2008-06-24 18:09:41 -07:00
Myk Melez
c9fba002aa
bug 441446: set mozBackgroundRequest on XMPP request object when created rather than when used, since it only needs to be set once
2008-06-24 17:45:37 -07:00
Atul Varma
4c1fcc3c2b
Added a really, really basic sync test for bookmarks.
2008-06-24 16:55:56 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
8ad5c2a828
Merged
2008-06-24 13:41:25 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
6d56568a9e
Merged
2008-06-24 13:41:12 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
968af20f5e
Added todo about exception handling
2008-06-24 13:41:01 -07:00
chris@h-194.office.mozilla.org
9ae9a3f5e8
merging
2008-06-24 12:44:26 -07:00
chris@h-194.office.mozilla.org
7a0411af09
added embedded verification method to login (this wants to be it's own object method, but should work well enough for now.)
...
some formatted cleanup for wizard.js
2008-06-24 12:42:52 -07:00
Dan Mills
4b9dbfb59b
Store each delta as a separate file on the server
2008-06-24 12:33:27 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
415890ca9e
Finished the bridge between UI code and bookmark engine so that stopSharing gets called when you pick the menu itme.
2008-06-24 12:22:32 -07:00
chris@chris-beards-macbook-pro-2.local
52a8ad1e41
another pass at polishing the first run experience, work in progress
2008-06-24 08:51:40 -07:00
Maria Emerson
6e54ca06f6
consolidated error reporting, formatting tbd
2008-06-23 22:48:44 -07:00
Atul Varma
5fea10727c
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
8d52b5a923
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
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
c8ba0cdfff
Make the stop-sharing-data command work
2008-06-23 18:23:08 -07:00
Atul Varma
c09f48513b
Added some more visibility to the individual steps of test_passwords.
2008-06-23 18:01:48 -07:00
Atul Varma
23901bc549
Updated expected log for test_passwords based on recent code changes.
2008-06-23 17:41:01 -07:00
Justin Dolske
53d6ead038
Bug 433949 - Use WeaveCrypto component (NSS) instead of OpenSSL
2008-06-23 16:23:57 -07:00
Myk Melez
35d44bd62b
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-23 16:22:17 -07:00
Myk Melez
52716ad0ac
wrap notify around lock instead of the other way around so that notify includes locking failure/success in its notifications
2008-06-23 16:22:05 -07:00
Justin Dolske
c0769fe961
Use allocated buffers instead of stack when the buffers can be large (OS X has a 1MB limit)
2008-06-23 16:14:55 -07:00
Myk Melez
f23fc59659
bug 435341: sync automatically when Firefox quits
2008-06-23 16:10:31 -07:00
Maria Emerson
9192f5c08b
work in progress, push for wizard
2008-06-23 15:48:01 -07:00
Atul Varma
18b2d9eb3f
Added 'resync on second computer' step to test_passwords.
2008-06-23 14:45:58 -07:00
Atul Varma
fe2957c61d
Removed a line of code that was raising a strict warning, and which also just defined an unused local variable that called no functions and therefore had no side effects (unless there were property getters that had side-effects involved, which hopefully wasn't the case).
2008-06-23 14:32:55 -07:00
Atul Varma
3f66c5c26a
Moved the FakeGUIDService from test_passwords.js to head.js.
2008-06-23 14:13:46 -07:00
Justin Dolske
6f8cfd6329
Add Makefile support for building on ARM, move comment that triggers bug on scratchbox's Make 3.80
2008-06-22 14:43:09 -07:00
Atul Varma
0559b0e418
A tiny bit more refactoring to test_passwords.
2008-06-20 18:36:33 -07:00
Atul Varma
3d1514d12d
Oops, forgot to recommit the canonical log for test_passwords in my last commit.
2008-06-20 18:36:11 -07:00
Atul Varma
cc43d11f3c
Fake GUID generator now provides a different yet deterministic GUID upon each invocation.
2008-06-20 18:25:21 -07:00
Atul Varma
8b16c18fe7
test_passwords now also removes a user after doing everything else.
2008-06-20 18:04:59 -07:00
Atul Varma
4b0e7167bd
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
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
bf4b17ef6b
The XMPP server is now configured to use LDAP for authentication (on sm-labs01, and soon to be on services.mozilla too) so the xmpp username/password will now be the same as the weave username/password. So I now use those to login, and I got rid of the two extra preferences which we used to have for xmpp username/password.
2008-06-20 17:19:10 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
e81cd3694a
fixed some minor formatting
2008-06-20 16:46:38 -07:00
Atul Varma
b93ec60294
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
Myk Melez
760941e17d
make xmpp requests be background requests so they don't get horked by load group problems or throw up auth dialogs
2008-06-20 14:26:40 -07:00
Atul Varma
02bbaa5ff6
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
0ea26a3466
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
c0b0185e09
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
85a56e5aa8
Added an expected-log for the passwords sync engine unit test.
2008-06-20 12:39:50 -07:00
Atul Varma
15d84c6df5
Refactoring: consolidated duplicate code creating GUIDs via XPCOM gunk into a new function, Utils.makeGUID().
...
Note that there are some strange things re: whitespace in engines/bookmarks.js in this changeset; I literally only changed one line, though, and I'm not sure where they came from. Maybe it was js2-mode?
2008-06-20 12:34:29 -07:00
Atul Varma
5fe60a3ceb
Minor code tidying.
2008-06-20 12:27:17 -07:00
Atul Varma
8e53749c97
Changed log level in a unit test.
2008-06-20 12:24:02 -07:00
Justin Dolske
48d96ab71d
Small bug fix from my last small bugfix. :(
2008-06-19 20:18:59 -07:00
Atul Varma
d808b40fee
Fixed a bug in the outstanding-callback-warning system and made Generator.throw() and Generator.cont() private methods because no client code was using them and it could introduce bugs in the system if they do; we can revisit making them public again later if we want.
2008-06-19 19:03:10 -07:00
Maria Emerson
03ae7c8d0d
Automated merge with ssh://memerson@mozilla.com@hg.mozilla.org/labs/weave
2008-06-19 17:55:09 -07:00
Atul Varma
7f5209a1c7
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
ba5e6be87c
Removed warning message from ID.get() because it's actually normal to pass in an ID that doesn't exist to it, to test for its existence. Though perhaps there should be an exists() method for such a use case instead.
2008-06-19 16:37:53 -07:00
Atul Varma
f9a93ee91d
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
Maria Emerson
8c35fd7043
updating wizard
2008-06-19 15:43:50 -07:00
Justin Dolske
e8e2bce2ce
Fix reference to undefined function and bad async arg.
2008-06-19 15:36:24 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
603b5e26ba
Fixed some more missing commas that were preventing engines/bookmarks.js from loading
2008-06-19 15:25:25 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
92c242b8df
Added missing comma after function definition
2008-06-19 15:23:01 -07:00
Justin Dolske
4247cabcad
Apparently NS_IMPL_NSGETMODULE("FOO") doesn't work on Linux, but NS_IMPL_NSGETMODULE(FOO) does.
2008-06-19 14:51:20 -07:00
Justin Dolske
470e9c1705
Minor tweaks for compile errors on Linux.
2008-06-19 13:03:10 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
ab9f0aa2bb
Backed out changeset 7720a1dd564a because the new crypto stuff that it uses hasn't been enabled yet.
2008-06-19 11:59:52 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
69da8061fb
Applied dolske's patch from bug 433949 to make the bookmarkEngine work with the new improved Crypto interface.
2008-06-19 11:41:57 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5f7b9953fd
merged
2008-06-19 10:51:54 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
f02bb1638d
Reimplemented most of _updateIncomingShare to work with the new implementation of _updateOutgoingShare. No more need for the ugly hack to temporarily set the root directory of DAV, hooray
2008-06-18 23:27:48 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
52fd203c7d
Implemented _stopOutgoingShare (though it's still not being called from anywhere).
2008-06-18 23:00:09 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
5524c106b5
Added documentation to createIncomingShare, rewrote it a little to be consistent with the other new stuff, and made it use annotations to keep track of the server path to the shared data.
2008-06-18 22:37:06 -07:00
Justin Dolske
947132ed2c
Checkin of NSS-ized WeaveCrypto module (not yet used)
2008-06-18 21:42:16 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
f2d0ad6ab6
Gave the bookmarksEngine a permanent (lazy-initialized) reference to the annotation service, rather than recreating the reference every single time we use the service. Which is a lot of times now.
2008-06-18 20:53:11 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
080ec435c2
Implemented _updateAllOutgoingShares in bookmarkEngine.
2008-06-18 20:45:01 -07:00
Myk Melez
001d6fc9e7
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-18 19:35:31 -07:00
Myk Melez
26e6962578
bug 439553: add a 'change password' form to the weave preferences
2008-06-18 19:35:23 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
fd658ea35e
Removed an unneeded yield statement from startXmppClient (this was raising warnings about yeilding without a callback.)
2008-06-18 18:48:17 -07:00
Atul Varma
d4048117ef
Finished test_passwords.js, although it raises a number of strict warnings.
2008-06-18 18:08:33 -07:00
Atul Varma
6c09312d2a
Replaced boilerplate XPCOM code with calls to util.js functions.
2008-06-18 18:04:01 -07:00
Atul Varma
8742aa37bd
Fixed a preference typo in test_service.js.
2008-06-18 17:33:44 -07:00
Atul Varma
8f20b9b0d9
Automated merge with http://hg.mozilla.org/labs/weave
2008-06-18 17:28:38 -07:00
Atul Varma
6c5227493a
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
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
d2c2945873
Set the default preference for weave's xmpp server-url to be the new secure url for the ejabberd server on sm-labs01.
2008-06-18 17:25:46 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
6f0992239d
Turned all remaining dump()s in transportLayer.js into Log4Moz debug calls.
2008-06-18 17:23:04 -07:00
Atul Varma
cb0d33d536
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
6e83ffc460
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
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
bdff709f9e
Imported Log4Moz to xmpp/transportLayer.js and xmpp/authenticationLayer.js, so they're no longer raising errors about Log4Moz being undefined (oops, sorry, should have tested before pushing.)
2008-06-18 14:59:06 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
4895e6e665
Merged
2008-06-18 14:53:30 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
39e5ae9520
XMPPClient sends its debugging output to log4moz (mostly debug level) now instead of dump, so it's less annoyingly verbose.
2008-06-18 14:50:02 -07:00
Atul Varma
7809c95d7d
Refactored some file operations into a new function in Utils and out of engines.js.
2008-06-18 14:12:24 -07:00
Justin Dolske
f51c756491
You have: no tea. (Remove old TEA crypto support)
2008-06-18 13:25:58 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
78cac8373f
The xmpp messages that are sent when a share is offered now include the server-side path to the share directory.
2008-06-18 13:16:32 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
229ebe76ae
Merged
2008-06-18 12:48:26 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
797ac6aec0
made all calls to Resource.get() and Resource.put() properly asynchronous.
2008-06-18 12:48:20 -07:00
Atul Varma
e82cad86bc
Fixed typos.
2008-06-18 12:45:02 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
8d6a736f7a
Removed the check of whether the directory exists before creating it, in _createOutgoingShare(): realized it's not neccessary since DAV.MKCOL already does it.
2008-06-18 12:41:34 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
e598f7db5b
Merged
2008-06-18 12:32:52 -07:00
Atul Varma
25136833fc
Replaced a bunch of boilerplate XPCOM with a call to Utils.makeTimerForCall().
2008-06-18 12:32:20 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
65ba4ec4e7
Merged changes
2008-06-18 12:29:39 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
95c9d3d61e
Added documentation to BookmarkEngine._updateOutgoingShare.
2008-06-18 12:29:25 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
249a68c1a7
Complete rewrite of _createOutgoingShare and _updateOutgoingShare in BookmarkEngine, using remote.Resource objects and Crypto.
2008-06-18 12:26:51 -07:00
Atul Varma
4267f258ce
Removed an unused constructor parameter from PasswordEngine.
2008-06-18 12:04:49 -07:00
Atul Varma
b48aab609f
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
8181559fa4
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
d27f37c0a2
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
c0e257ba53
Added a fake preference service to test_service.
2008-06-17 11:45:13 -07:00
Atul Varma
89886c8e2e
Fixed a minor typo, though there's a better way to do the unary getter which Myk told me about; will probably substitute that soon.
2008-06-17 11:11:56 -07:00
Atul Varma
4593669547
Added a fixme/todo in the code.
2008-06-17 10:23:35 -07:00
Dan Mills
2df246304e
merge upstream changes
2008-06-17 18:04:16 +09:00
Dan Mills
747f38bb06
make RemoteStore a but more Store-like (wrap, wipe methods); fix a missing yield
2008-06-17 18:03:02 +09:00
Dan Mills
e82eb09a88
Don't allow re-entrance! Fail to lock when we already hold a lock.
2008-06-17 18:01:48 +09:00
Atul Varma
6826c19d20
Fixed a strict warning in util.js.
2008-06-16 18:11:41 -07:00
Atul Varma
4a3b6cdbe8
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
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
9d0d519adc
In the middle of trying to make createOutgoingShare work with Dan's changes (getSymKey having been moved to remote.js, etc.)
2008-06-16 17:52:24 -07:00
Dan Mills
fb2fc5aa61
merge upstream changes
2008-06-17 09:51:25 +09:00
Dan Mills
e81712ba48
treat paths beginning with '/' as absolute
2008-06-17 09:51:02 +09:00
Atul Varma
5595fd35d7
Refactored test suites based on recent changes.
2008-06-16 16:53:53 -07:00
Atul Varma
30722d0b82
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
832e0d67de
Refactored head.js for unit tests so that we now have an 'initTestLogging()' function.
2008-06-16 16:22:00 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
d5abb2d95d
Merged
2008-06-16 15:52:26 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
814b755255
Trying to debug _createOutgoingShare...
2008-06-16 15:52:15 -07:00
Atul Varma
dd6b64092d
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
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
8b852636ee
Merged
2008-06-16 11:24:41 -07:00
Dan Mills
e07d7c101f
move more remote-interaction code into RemoteStore (and out of Engine)
2008-06-17 01:04:23 +09:00
Dan Mills
3ecee1a32e
catch 404s from initSession and do an initial upload; fix some bugs (missing yields, references to Engine properties) in RemoteStore.initialize
2008-06-16 00:21:44 +09:00
Dan Mills
ba5e8762d2
merge upstream changes
2008-06-15 13:42:10 +09:00
Dan Mills
b9e5b182df
merge upstream changes
2008-06-14 17:10:40 +09:00
Dan Mills
25f6da01d1
Move remote init code ('fullUpload') into RemoteStore; make RemoteStore hold an Engine object (tightly coupling them); make the server prefix and identity properties of Engine public
2008-06-14 17:07:06 +09:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
2092466c5f
Merged
2008-06-13 16:22:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
351b7b4c82
Fixed some minor bugs -- the name of the incoming shared folder is parsed correctly, and xmppClient now catches bounce errors that were previously parsed as messages.
2008-06-13 16:20:43 -07:00
Atul Varma
0fb90163fb
Fixed an 'outstanding callbacks' warning and simplified the code a tiny bit.
2008-06-13 15:39:06 -07:00
Myk Melez
f0482b56e3
use nsIXMLHttpRequest::mozBackgroundRequest instead of DummyAuthProvider to suppress authentication dialogs and ensure XMLHttpRequests succeed even when the window that originated the request goes away
2008-06-13 13:08:36 -07:00
Dan Mills
0c475dfe37
To avoid some async.js warnings: Turn some 'yield' calls into 'return' ones, and don't call 'self.cb' twice in a row when constructing event listeners for XHRs.
2008-06-13 15:49:18 +09:00
Dan Mills
266d18fda1
Make some 'debug' log calls into 'trace' ones. Use the frame formatter, which will remove long paths to extension dirs from the output. Don't warn about outstanding callbacks if we caught an exception from the generator.
2008-06-13 15:47:41 +09:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b25663858a
Merged
2008-06-12 17:35:57 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
3f2b6465d8
Made the initialization of the xmppClient an asynchronous call. This included modifying xmppClient.js so that connect() can be passed a callback function that will get called once the connection has succeeded or failed. For most of our purposes this is probably a better API than what we had before where you call waitForConnection() and it busy-waits until the connection has succeeded or failed.
2008-06-12 17:35:44 -07:00
Myk Melez
815dae2a85
work around XmlHttpRequest bug 317600 by pausing for a 0ms timeout before trying to log in
2008-06-12 16:23:59 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
9e6d103089
Merged changes.
2008-06-12 14:30:46 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
a16e4f22e2
Fixed the server URL for xmpp connections.
2008-06-12 14:30:39 -07:00
Myk Melez
8194366c43
bug 410550: stop running scheduled sync when the user is not logged into weave
2008-06-12 12:36:58 -07:00
Atul Varma
b60c082c90
Changed some of the debug() logging statements I added a few commits ago into trace() statemetns b/c they were drowning the log.
2008-06-12 12:00:19 -07:00
Myk Melez
3087d30c1b
only retrieve score once per engine when doing a scheduled sync, since retrieving the score can be a non-negligible cost for trackers that calculate the score on-demand (like the tab tracker)
2008-06-11 20:07:35 -07:00
Myk Melez
ca47e27d9b
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-11 20:00:59 -07:00
Myk Melez
7233ee2c14
don't sync tab entry IDs, which change with every session, to avoid generating edit commands for every tab on restart even when the tabs haven't actually changed
2008-06-11 20:00:48 -07:00
Atul Varma
56acc2b13b
async.js now keeps track of how many outstanding callbacks it has and uses this information to log warnings about coroutines that may have yielded without an outstanding callback, and coroutines that may have finished while a callback is still outstanding. These are merely 'warnings' rather than certainties because this code assumes that there is a 1:1 correspondence between accesses to self.cb and yields, and also that self.cb's are actually passed to asynchronous functions. It'd be really cool if we could actually keep track of whether a callback got garbage collected before it was called or something, though I don't know how much it'd help in the end.
2008-06-11 19:19:16 -07:00
Atul Varma
be8fa61e49
Added a few log messages to hopefully make the debugging of generators easier. Also added an id component to generators, which is part of their name, to help distinguish between concurrent instances of the same generator function. The following debug output represents the new logging infomation:
...
--
Async.Generator DEBUG runTestGenerator-0: self.cb generated at test_async_missing_yield.js:28
Async.Generator DEBUG secondGen-1: self.cb generated at test_async_missing_yield.js:20
Async.Generator DEBUG secondGen-1: done() called.
Async.Generator DEBUG runTestGenerator-0: self.cb() called, resuming coroutine.
Async.Generator DEBUG runTestGenerator-0: done() called.
Async.Generator DEBUG secondGen-1: self.cb() called, resuming coroutine.
Async.Generator DEBUG secondGen-1: done() called.
Async.Generator ERROR Async method 'secondGen-1' is missing a 'yield' call (or called done() after being finalized)
--
As you can see, I've added log messages whenever the Generator's 'cb' property is accessed--this is almost guaranteed to be very close to a 'yield' statement, and therefore provides us with a decently accurate idea of where the generator 'stopped'. We also log a message when the generator continues, and by doing so we get an idea of how the coroutines interleave.
Another idea I had was to actually match calls to self.cb with calls to 'yield' to automatically detect e.g. two yields in a row (which will ordinarily result in a generator 'hanging'), a generator exiting while a self.cb still hasn't been called, but I'm not sure what kinds of reprecussions it may have.
2008-06-11 18:58:30 -07:00
Myk Melez
b9bfc1ea31
numChanged should be the number of shared items whose data is different, not the same
2008-06-11 18:47:56 -07:00
Atul Varma
8de2595745
Merged changes.
2008-06-11 18:03:11 -07:00
Atul Varma
ed2bdb9dcc
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
Maria Emerson
4af7d05d92
bug 438033: implement a better first-run wizard process; r=myk
2008-06-11 17:56:02 -07:00
Myk Melez
f096f65f19
Automated merge with ssh://hg.mozilla.org/labs/weave/
2008-06-11 17:45:54 -07:00
Myk Melez
5e916d02f2
bug 437529: yield after starting to put the status file to the server so we don't finalize the sync until the PUT request completes
2008-06-11 17:44:08 -07:00
Atul Varma
c5c9fbdf16
Modified test_async_exceptions to use a fake nsiTimer.
2008-06-11 17:10:39 -07:00
Atul Varma
1a2855c05b
Added a unit test for async exceptions.
2008-06-11 16:38:22 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b047be1d6c
Fixed Utils.prefs.getStringPref (should be getCharPref)
2008-06-11 15:43:12 -07:00
Myk Melez
2d0e404b20
resetting the score is not an asynchronous operation, so Service::_syncEngine shouldn't yield after calling it
2008-06-11 15:23:54 -07:00
Myk Melez
05138ca62c
clarify wording in scheduled sync threshold debug statements
2008-06-11 14:16:03 -07:00
Myk Melez
b9cbb59a9e
fix typo in recent checkin that broke appending deltas to the deltas file on the server
2008-06-11 14:14:04 -07:00
Myk Melez
4d6ca43c38
once sync thresholds reach 1 (the lowest possible value), leave them there until something changes and we sync
2008-06-11 13:50:47 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
9672201b26
Resolved merging conflicts to service.js.
2008-06-11 11:54:44 -07:00
jonathandicarlo@localhost
b308c467e5
Created preferences for xmpp connection info (server url, realm, username, password), and a preference to turn xmpp messaging on or off, and made BookmarkEngine._init() call startXmppClient when this preference is true.
2008-06-11 11:13:35 -07:00
jonathandicarlo@localhost
52089ca901
Expanded bookmarkEngine.share and added some more todos for the next round of functions to implement
2008-06-11 11:01:45 -07:00
Myk Melez
8239794199
merge
2008-06-11 10:41:57 -07:00
Myk Melez
995b8141d8
bug 430363: ignore remove commands when generating deltas for history so the deltas file on the server doesn't grow too large; r=thunder
2008-06-11 10:40:24 -07:00
Myk Melez
b8067a3a48
bug 434816: use a decreasing threshold algorithm for the periodic scheduled sync to make sure we eventually sync even small changes to data; r=thunder
2008-06-11 10:38:25 -07:00
Dan Mills
505b2aa8de
merge upstream changes
2008-06-11 23:31:28 +09:00
Myk Melez
292cc1dc84
give Engine a public getter for its snapshot that TabTracker can access when generating a sync urgency score
2008-06-11 00:03:28 -07:00
Dan Mills
b3442a6e9e
Various changes:
...
Engine/RemoteStore:
* Move code to make the engine remote directory into RemoteStore.
* Fix initSession call in Engine to properly use callback / call yield.
* Do not check '_getServerData' return status in _sync, we will use exceptions from RemoteStore instead.
* Move code to push a new delta into RemoteStore (appendDelta()). Currently comments out code that forces a re-upload in cases where the server (engine) format version was different. We may add this back later into RemoteStore (?).
* Note that this patch also removes the 'this._encryptionChanged' conditional, which I believe is currently useless (we never set it).
Service:
* When wiping the server (due to a server version mismatch), skip .htaccess files, since they are usually not user-modifiable.
2008-06-11 11:12:04 +09:00
Anant Narayanan
d9354ae9de
Make sync service check score before syncing: bug #434816 (r=thunder)
2008-06-10 13:45:37 -07:00
Atul Varma
98e7589518
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
c040b0cc2f
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
d55da707d9
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
fc4056ba01
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
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
ff96529b7e
Merged
2008-06-09 18:44:21 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
be8d8ca4df
Fixed a couple of minor bugs that were preventing bookmark share from starting (like, i was skipping enabled engines instead of disabled engines... duhh)
2008-06-09 18:44:13 -07:00
Atul Varma
e578772f0b
Fixed a bug that was causing failing unit tests using async.js to not properly report error conditions.
2008-06-09 18:40:30 -07:00
Atul Varma
9a50d3a029
Added a POST method to dav.js.
2008-06-09 17:36:54 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
f0b2f120ea
Moved the writing of the outgoing-share annotation on the bookmark folder to BookmarkEngine._share, where it makes a lot more sense than it does in the share.js dialog-box code where it used to be.
2008-06-09 16:49:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
09185ac26b
Fixed a couple minor bugs that were preventing bookmark engine from starting up properly
2008-06-09 16:19:58 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
def99000e2
Renamed bookmarkeEngine methods so they make more sense with the new sharing model, e.g. updateAllIncomingShares instead of syncMounts.
2008-06-09 15:27:09 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
b35a6930b7
Merged
2008-06-09 12:13:03 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
512d95591b
The folder annotation for outgoing shared folders is now a string containing the username of the person the folder is being shared with. Also moved to using const strings in bookmark-menu-overlay.js.
2008-06-09 12:12:51 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
8829030b84
Merged
2008-06-09 11:49:04 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
ea75f4df3a
Fixed my code so that BookmarkEngine._sync() now works correctly to call Engine._sync() and BookmarkEngine.syncMounts(), asynchronously. Added in some TODO comments about what's going to happen in the next round of refactoring.
2008-06-09 11:48:52 -07:00
Atul Varma
e63f4ac16e
Just added a few semicolons that js2-mode warned me about.
2008-06-09 09:45:55 -07:00
Atul Varma
49aee667f5
Added more tests to test_async.js and documented them a bit.
2008-06-07 00:34:33 -07:00
Atul Varma
948613950d
Fixed an inaccuracy in the async.js test suite.
2008-06-07 00:22:57 -07:00
Atul Varma
0c65b8b3d6
Added a unit test suite for modules/async.js.
2008-06-06 21:40:30 -07:00
jonathandicarlo@localhost
5bb48d8dfa
Added license block and explanatory comments to bookmarks.js
2008-06-06 19:28:01 -07:00
jonathandicarlo@localhost
a59f8a133c
Made BookmarkEngine.sync() responsible for calling BookmarkEngine.syncMounts (to get the incoming shared bookmark folder contents), eliminating the FIXME that previously had this being called from special-case code in WeaveSvc.sync().
2008-06-06 19:22:23 -07:00
chris@h-194.office.mozilla.org
d5a40e3690
merging branches
2008-06-06 17:58:02 -07:00
chris@h-194.office.mozilla.org
31e59001d5
- Adding temporary button to load account creation form for sm-labs01 while work continues on the first run process.
...
- Minor reorganization of preferences, namely, moving the advanced debugging tools into a sub-dialog and ensure each have a descriptive confirmation prompt.
2008-06-06 17:57:16 -07:00
Atul Varma
3e159040cb
Merged changes.
2008-06-06 17:46:46 -07:00
Atul Varma
cdffb0e77e
In async.js, renamed 'object' to 'thisArg', which makes the code clearer and easier to understand.
2008-06-06 17:46:34 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
e09c7116a8
Resolved conflicts with Chris's changes (to use the username, unhashed, as the name of the server-side sharing directory)
2008-06-06 17:43:15 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
11f8af5431
Moved _createShare and _share() from engines.js to BookmarkEngine class in engines/bookmarks.js. The identity of the folder to be shared is now passed from the share dialog box (share.xul) into BookmarkEngine._share().
2008-06-06 17:33:44 -07:00
chris@h-194.office.mozilla.org
32b49e6b82
- turning in the bookmarks sharing UI, although it's still not fully functional.
2008-06-06 14:40:35 -07:00
chris@h-194.office.mozilla.org
f500b95f11
- this check in will break everyone temporarily, as it involves the changes necessary to shift us from sha1(email) to usernames, and to enable sharing on the server.
...
- we are also changing the default preferences on the trunk to point to the new staging server at https://sm-labs01.mozilla.org:81 that has been modified to support usernames
- everyone will need to create a new account and this will be streamlined within the startup function, which will now kick off on first run (we'll check in the updated setup wizard shortly)
- this checkin also cleans up a number of strings
2008-06-06 14:18:50 -07:00
Anant Narayanan
8697d54544
Fix linux builds (bug 433922, r=thunder)
2008-06-05 17:21:53 -07:00
Myk Melez
3fd6e2ee70
bug 437523: fix NS_ERROR_FAILURE on nsIJSON.decode in JsonFilter_afterGET
2008-06-05 16:25:55 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
0ecee8a817
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
Dan Mills
a2659cdec7
merge upstream changes
2008-06-05 23:11:20 +09:00