Closed Bug 805448 Opened 12 years ago Closed 11 years ago

Write Marionette tests for battery level changes

Categories

(Core :: DOM: Device Interfaces, defect)

19 Branch
ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: davehunt, Assigned: davehunt)

References

Details

Attachments

(1 file)

We need automated tests for the Battery API to ensure that simulated changes to the battery capacity level (level increase, level decrease) fire the appropriate events. As these tests will require simulating hardware changes, they will be necessary to run in the emulator and will therefore use Marionette.
Blocks: 805435
Blocks: 805452
Assignee: nobody → dave.hunt
Status: NEW → ASSIGNED
Attachment #690920 - Flags: review?(rwood)
Attachment #690920 - Attachment description: Battery level tests. v1.1 → Battery level tests. v1.0
Comment on attachment 690920 [details] [diff] [review]
Battery level tests. v1.0

Review of attachment 690920 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great (just a tiny nit). The test passed fine when I ran it locally (along with all of the /battery tests).

::: dom/battery/test/marionette/test_battery_level.js
@@ +35,5 @@
> +     nextFunction();
> +    };
> +    runEmulatorCmd("power capacity " + capacity);
> +  }
> +  else {

nit: have the else on the line above ie. } else {
Attachment #690920 - Flags: review?(rwood) → review+
Sorry for the late response here, and thanks for the review. I'm in the practice of having the else on a separate line from our Mozmill style guide [1]. Is there a style guide defined for these tests that I should be following?

[1] https://developer.mozilla.org/en-US/docs/Mozmill_Tests/Mozmill_Style_Guide#Conditionals
Ok cool - well it is just a small nit / style difference anyway. No I'm not aware of any style guide for these particular tests, I just go by the MDN coding style [1] (that doesn't specify this particular case either).

[1] https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style
Thanks Rob, marking as checkin-needed.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/cee0b66c744c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: