Commit Graph

213 Commits

Author SHA1 Message Date
Edward Lee
58b70d2360 Bug 573668 - Register appinfo with correct OS for tests
Register a fake AppInfo with correct OS if it doesn't exist yet. Just use Svc.Crypto instead of trying to dynamically pick the contract id. Name the head files so they load in appinfo -> helper -> http order.

--HG--
rename : services/sync/tests/unit/bookmark_setup.js => services/sync/tests/unit/head_appinfo.js
rename : services/sync/tests/unit/head_first.js => services/sync/tests/unit/head_helpers.js
2010-06-22 00:20:31 -07:00
Edward Lee
0192c7670c Bug 573679 - Fix tests to pass on trunk
Create a bookmark so that the url will exist when setting annotations.
2010-06-21 23:56:56 -07:00
Philipp von Weitershausen
919ecb4821 Bug 557589 - code audit and create unit test plan for service.js [r=mconnor]
Part 5: Tests for checkUsername, createAccount, changePassword
2010-06-17 16:47:13 +01:00
Philipp von Weitershausen
bf85b6b3c2 Bug 557589 - code audit and create unit test plan for service.js [r=mconnor]
Part 4: Get rid of superfluous attribute, introduce constants for password/passphrase realms, add/improve tests for login(), logout(), persistLogin().
2010-06-17 04:12:38 +01:00
Philipp von Weitershausen
47e58c78c2 Bug 557589 - code audit and create unit test plan for service.js [r=mconnor]
Part 3: Tests for Weave.Service._{find|set|update}Cluster()
2010-06-09 11:07:54 -07:00
Philipp von Weitershausen
e5aa302439 Bug 573015 - Get rid of 'attic' and 'need-work' tests [r=mconnor] 2010-06-18 09:39:03 -07:00
Edward Lee
46e1de249f Bug 570636 - Decide how to co-exist as a sync add-on and built-in sync [r=mconnor]
Migrate prefs from extensions.weave. to services.sync. when loading the service for the first time before migration.
2010-06-16 14:30:13 -07:00
Edward Lee
4e55362a90 Bug 570636 - Decide how to co-exist as a sync add-on and built-in sync [r=mconnor]
Map the modules directory to services-sync instead of weave and update imports.
2010-06-16 14:30:08 -07:00
Edward Lee
0d25dd2924 Bug 568677 - Failure to get CryptoMeta assumes it's missing [r=mconnor]
Explicitly check the status code to make sure we stop syncing on non-404 crypto meta failures. Add tests to check correct behavior of 404 and non-404 errors during syncStartup.
2010-06-14 15:16:53 -07:00
Philipp von Weitershausen
b37e25a581 Bug 570180 - Setup wizard sets passphrase='foo' [r=mconnor]
Promote _verifyLogin to a public method so we have a way to query login status even with a non-existent or invalid passphrase.
2010-06-14 21:03:39 +01:00
Philipp von Weitershausen
4eb68874cb Bug 570573 - Clean up uses of switch (Svc.AppInfo.ID) for app-specific hacks (Part 2) [r=mconnor]
Weave.Service.onStartup now triggers autoconnect after a fixed delay specified in a preference. If that preference is absent, nothing happens and apps are responsible for triggering autoconnect in a weave:service:ready observer themselves. Provide such observers for Firefox and Fennec.
2010-06-10 17:04:49 -07:00
Philipp von Weitershausen
128fdd1bef Bug 570573 - Clean up uses of switch (Svc.AppInfo.ID) for app-specific hacks (Part 1) [r=mconnor]
Weave.Service._registerEngines now reads the list of engines from a preference so that apps can specify it this way. The switch logic stays as fallback for the addon case.
2010-06-09 17:22:03 -07:00
Edward Lee
9ddf0f8ed5 Bug 546551 - Weave status bar notifications are too busy [r=mconnor]
Remove status bar icon/text for setup/connect/sync status. Add menuitem for setting up sync instead of drilling down a 1-item submenu that leads to a button. Remove unused Engine.displayName and related strings.
2010-06-14 10:30:37 -07:00
Edward Lee
0ef81dfdae Bug 569355 - source code reorg, redux [r=mconnor]
Split the code structure to service/{crypto,sync} and ui/{fennec,firefox}. Update the top level makefile to build the addon staging directory to merge various parts of directories.
2010-06-09 17:03:31 -07:00
Edward Lee
bf0c20b919 Bustage fix for bug 570635 to allow more time for the timeout to trigger. 2010-06-09 15:38:17 -07:00
Edward Lee
ef8599f8c5 Bug 570635 - Use async queries for fetching form data [r=mconnor]
Create a Utils.queryAsync to wrap executeAsync that fetches all rows and columns by name. Update form and history engines to use it.
2010-06-09 09:35:01 -07:00
Philipp von Weitershausen
fb0dbc769b Bug 569740 - Tab Characters within Usernames Can Cause Connectivity Issues & Security Events [r=mconnor]
Strip tabs from username since tabs are stripped from URIs and the username is part of all URIs.
2010-06-08 19:05:05 -07:00
Philipp von Weitershausen
79066a071f Bug 557589 - code audit and create unit test plan for service.js [r=mconnor]
Part 2: Tests for module startup, Weave.Service attributes.
2010-06-04 17:05:55 +01:00
Philipp von Weitershausen
c0bcc6524a Bug 570152 - engine.js tests should completely reset preferences [r=mconnor]
Switch to resetBranch("") instead of resetting individual prefs.
2010-06-04 16:38:38 +01:00
Philipp von Weitershausen
66a57fc0d9 Bug 570137 - test_engine fails on Minefield [r=mconnor]
Setting an attribute that has a getter no longer throws an exception in Minefield, it's just ignored.
2010-06-04 15:14:27 +01:00
Philipp von Weitershausen
c827b6ed13 Bug 569730 - Can't log in a 2nd computer [r=Mardak]
Fix a regression introduced with the status.js refactoring (bug 557590).
2010-06-04 14:44:04 +01:00
Edward Lee
2ddf5e7a90 Bug 568136 - Migration requires client to check for a node again after a 401 [r=mconnor]
Allow observers to watch for resource 401s and to specify a new uri to request. Test to make sure "weave:resource:status:401" gets notified and resource handles uri changes.
2010-06-03 18:37:07 -07:00
Edward Lee
4ef8492eaf Bug 569746 - Test with sync with smaller numbers to speed up testing
Reduce test run time (w/ coverage tool) from 25 minutes to 2 minutes while maintaining the same code coverage by processing hundreds instead of thousands of records.
2010-06-02 16:51:48 -07:00
Philipp von Weitershausen
81632f2661 Bug 566575 - Some tests FAIL on first run and PASS or hang on subsequent runs [r=mconnor]
Update to httpd.js from mozilla-central. server.stop() now expects a callback parameter, so pass a no-op where it's used.
2010-06-01 15:25:23 -07:00
Philipp von Weitershausen
721e3fa637 Bug 557596 - code audit and create unit test plan for resource.js [r=mconnor]
Lots of resource tests, Resource.serverTime initialized to null, Resource.headers normalized to lowercase.
2010-06-01 15:15:53 -07:00
Philipp von Weitershausen
912b4b6b57 Bug 557590 - code audit and create unit test plan for status.js [r=mconnor]
Initialize status values in status.js + tests for status.js.
2010-06-01 15:12:25 -07:00
Philipp von Weitershausen
ceaa8fab03 Bug 557588 - code audit and create unit test plan for engines.js [r=mconnor]
Tests for SyncEngine.sync(), incl some additions to harness.
2010-06-01 15:07:50 -07:00
Philipp von Weitershausen
ba3ea98599 Bug 557588 - code audit and create unit test plan for engines.js [r=mconnor]
Tests for EngineMangerSvc, Engine and SyncEngine sans sync().
2010-06-01 15:06:16 -07:00
Edward Lee
39c7860ed8 Bug 569428 - Add tests for FormEngine (Store) 2010-06-01 12:44:51 -07:00
Edward Lee
80423cab37 Bug 557591 - Add tests for Utils.sha1. 2010-06-01 11:59:21 -07:00
Edward Lee
8d2951b399 Bug 557591 - Add tests for Utils.anno with invalid uris. 2010-06-01 11:30:11 -07:00
Edward Lee
89f3d54c0f Bug 568518 - Unhelpful log messages [r=mconnor]
Remove "Server attack" from exceptions.
2010-05-27 11:04:30 -07:00
Edward Lee
4d78de7c1b Add tests for Utils.jsonSave and Utils.jsonLoad. 2010-05-20 18:03:19 -07:00
Edward Lee
7905ede039 Bug 557591 - Add tests for Utils.makeURI. 2010-05-19 09:40:45 -07:00
Edward Lee
e241252a4e Bug 557591 - Add tests for Utils.sha256HMAC. 2010-05-18 13:40:12 -07:00
Edward Lee
7c019e0309 Bug 557591 - Add tests for Utils.stackTrace. 2010-05-17 14:17:32 -07:00
Edward Lee
7befe92e24 Bug 557591 - Add tests for Utils.lazySvc. [r=mconnor]
Add a fake service that definitely won't exist for testing purposes.
2010-05-17 13:46:19 -07:00
Edward Lee
d54124209a Bug 557591 - Add tests for Utils.lazy2/cb.
--HG--
rename : services/sync/tests/unit/test_utils_lazy.js => services/sync/tests/unit/test_utils_lazy2.js
2010-05-17 12:47:29 -07:00
Edward Lee
247c43e425 Bug 557591 - Add tests for Utils.lazy/cb.
--HG--
extra : rebase_source : 4f2d102f31b2afa8d3c34261b63b344fccef824b
2010-05-17 12:43:20 -07:00
Edward Lee
cdf7defc20 Bug 557591 - Add tests for Utils.deferGetSet. 2010-05-14 17:31:24 -07:00
Edward Lee
36f17f2c20 Bug 557591 - Add tests for Utils.anno. 2010-05-10 18:08:52 -07:00
Edward Lee
310f605d46 Bug 557591 - Add tests for Utils.makeGUID. 2010-05-10 17:22:48 -07:00
Edward Lee
0e5816ef90 Bug 557591 - Add tests for Utils.notify. 2010-05-10 17:05:50 -07:00
Edward Lee
c61020e275 Bug 557591 - Add tests for Utils.lock. 2010-05-10 16:42:04 -07:00
Edward Lee
ff586e08e3 Bug 557591 - Add tests for Utils.catch.
--HG--
extra : rebase_source : 545492072668cfb6862dde756506e12cf43d4375
2010-05-10 16:22:32 -07:00
Justin Dolske
661389fa2f Bug 513798 - Rewrite WeaveCrypto in JS. r=mconnor, r=dwitte
--HG--
rename : services/crypto/components/IWeaveCrypto.xpt => services/crypto/IWeaveCrypto.xpt
2010-04-21 19:02:16 -07:00
Edward Lee
3b4aa0220d Bug 550627 - Default reconciliation to server wins for older changed items [r=mconnor]
Save the time the tracker adds a new changed id and use that to compare the age of the record on the server vs the age of the local change to decide if it's server wins or client wins. Fix up various direct uses of changedIDs to use the API and make the save-to-disk lazy to avoid excessive writes. Add a test to make sure addChangedID only increases in time.
2010-04-01 15:54:53 -07:00
Edward Lee
ba60f514a6 Bug 552134 - Ensure that keyring/symmetric key haven't been tampered with [r=mconnor]
Store a HMAC with the encrypted symmetric key instead of just the wrapped key and verify that the HMAC matches before unwrapping. Test that normal getting works and a tampered payload/HMAC fails but succeeds on restoring the correct HMAC.
2010-03-25 19:23:44 -07:00
Edward Lee
e5bce4658d Bug 549638 - Ensure that encrypted payloads haven't been tampered with [r=mconnor r=dolske]
Generate a SHA256 HAMC hex string from the base64 ciphertext and base64 symmetric key. Generate a HMAC key from the symmetric key and cache them together when unwrapping. Refactor the Utils.sha1 to share the same digest code.

--HG--
extra : rebase_source : dae973c62317eb3b738306fc30ea19870555c7df
2010-03-16 16:31:56 -07:00
Edward Lee
21f7747109 Bug 548066 - JavaScript strict warning: clientData.js, line 194: reference to undefined property this.clients[id] [r=mconnor]
Get rid of get/setInfo on ClientEngine and ClientStore and expose functions to read/modify client data: stats, clearCommands, sendCommand. Also expose the local client information as local[ID,Name,Type,Commands] and rework the storage to use these instead of trying to keep the JS object clients entry in sync with prefs, etc. Update users of the old interface (service/tabs/chrome) to use the new local*. Set the client type based on app id instead of from each app's overlay.
2010-03-16 16:39:08 -07:00