========
https://hg.mozilla.org/integration/gaia-central/rev/3ff317d48348
Author: Rick Waldron <waldron.rick@gmail.com>
Desc: Bug 882751 - Tapping in the center of the clock doesn't work as expected r=ianliu
https://bugzilla.mozilla.org/show_bug.cgi?id=882751
- Reorder digital-clock HTML elements to match analog-clock layout
- Creates explicit object for all timeouts
- Adds `container` to list of lazy init'ed elements
- Removes the unused `this.digitalClockBackground` element
- Consolidates init and initClockface, removes initClockface
- Ensures handleEvent is called with bound handlers
- removes unnecessary nested setTimeout function calls
- Consolidates logic from showAnalogClock, showDigitalClock and show
- Removes showAnalogClock, showDigitalClock
- Defines single pattern for clock face display
- Includes tests for support of Clock.show() and ClockView.handleEvent->show
- Adds mock_alarm_list, mock_asyncstorage
- Ensure that a clock face default always shows, no matter what.
- Request stored clock face mode as early as possible
- Ensure that clock face mode is updated if default doesn't match stored.
- Simplify the clock face rendering tests
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
========
https://hg.mozilla.org/integration/gaia-central/rev/f61a98729da9
Author: John Ford <john@johnford.info>
Desc: bug 851361 -- Revert "Merge pull request #8726 from leob2g/Bug_852361_Device_is_shut_down_when_battery_level_become_two_percents"
This reverts commit a7f1e921c67d5d3d4e0afaa06aca79320784e806, reversing
changes made to bd398458e986740d0a774d44ba0344ff3d6958cb.
========
https://hg.mozilla.org/integration/gaia-central/rev/de813755d4a4
Author: Rick Waldron <waldron.rick@gmail.com>
Desc: Bug 904220 - [Clock] Unit tests should not create actual alarm records r=ian-liu
commit af2a65ee86cc861a5b76dd2aca05bb1c6dfcd95d
Author: Mike Pennisi <mike@mikepennisi.com>
Date: Tue Aug 13 15:32:54 2013 -0400
Fix bug in unit tests
Loading the application HTML into the unit test environment breaks some
assumptions made by the tests. Notably: elements appended to the DOM
which have identical DOM IDs will no longer be returned by
`document.getElementById`.
A slightly cleaner approach might involve re-loading the `body` HTML
before *every* test and referencing elements from the global `ClockView`
object directly. This has two drawbacks:
1. It will tend to slow down the test suite (especially as more tests
are written)
2. It will require further re-factoring of the application logic (which
caches references to its DOM nodes when they are first referenced).
For these reasons, we might prefer the simplistic fix outlined by this
patch.
Part of this fix requires consistently loading the `loadBodyHTML`
utility function in `setup.js` (so that it is loaded when the test-agent
runs the entire test suite *and* when it runs individual test files).
commit 0ca745a11747ec7c27f333ae0bf675c7da883c6c
Author: Rick Waldron <waldron.rick@gmail.com>
Date: Mon Aug 12 18:46:31 2013 -0400
Bug 904220 - [Clock] Unit tests should not create actual alarm records
https://bugzilla.mozilla.org/show_bug.cgi?id=904220
- Reorders require files alphabetically
- Adds Mocks:
- mock_alarm_list.js
- mock_alarm_manager.js
- mock_navigator_mozl10n.js
- Update tests to use actual markup as fixture
- Update tests to use the same mocha API as other tests
- Use mocks instead of creating real alarm records
- Use sinon sandbox features
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>