mozilla-b2g/gaia — pull request #11383 by oconnore (2013-08-06 17:48:48+00:00)
Title: This commit refactors the Clock application.

1. An Alarm constructor is used to create new Alarms, instead of
creating new object literals.
2. Alarm repeat is represented as an object instead of a "bit
string".
3. The AlarmsDB API is changed to pass error messages in the
function(err, value) {...} style.
4. Asyncronous API calls are checked using callbacks. The async
functions in Utils make this easy (although including async.js
would be easier.
5. Testing is added for the Alarm object.
6. Added mock_alarmsDB and mock_mozAlarms for testing Alarms
7. Fixed alarm_edit tests. Moved to a new alarm_edit_test.js file.
8. Add tests for new utils methods (async and safeCpuLock)
9. Rename some variables. Remove "_name" naming scheme.