andreasgal/B2G — Issue #121: battery charging changes not detected by b2g in emulator
Author: jonallengriffin
Created: 2012-01-06 23:55:29+00:00
State: open

Changing the 'charging' state of the emulator does not get reflected in the charging state of b2g. This was discovered with a Marionette test case:

https://github.com/jonallengriffin/marionette_client/blob/master/marionette/tests/emulator/test_battery.py

which fails at line 77. This can also be seen manually by telneting into the emulator and issuing the commands:

power ac off
power status discharging

and noticing that the battery icon in the upper-right corner still shows 'charging'.

The test_battery.py test used to pass (in December), but I can't say when it regressed, as the emulator was not completely functional for a week+ during the removal of the android backend.

If you want to run the battery test yourself, you can:

1 - clone https://github.com/mozilla/mozbase and run python setup_development.py
2 - in another directory, clone https://github.com/jonallengriffin/marionette_client
3 - from the 'marionette_client' directory, 'cd marionette', and then run:
python runtests.py --emulator --homedir=/path/to/b2g tests/emulator/test_battery.py