power_LoadTest: Allow running on AC.

Test is useful benchmark regardless of whether determining battery
life so allow it to be run if AC is connected.

Change adds keyval 'on_ac' and qualifies battery life calculations to
avoid div-by-zero errors to enable/identify this mode.

BUG=none
TEST=run power_LoadTest
1. with ac_ok=True for init
- Test passes, b_ac_on == True
2. with ac_ok=False for init
- Test fails with message '
  ERROR: Running on AC power. Please remove AC power cable.

Change-Id: If38f8a52063deed036703494403447fbac05953e
Reviewed-on: https://chromium-review.googlesource.com/196524
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
1 file changed