Closed Bug 1050746 Opened 10 years ago Closed 9 years ago

Clarify defaults when a BatteryManager object is created.

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1050749

People

(Reporter: NinjaTrappeur, Assigned: wcpan, Mentored)

References

Details

(Keywords: meta, Whiteboard: [good first bug][lang=js)

Attachments

(1 file, 1 obsolete file)

We need to ensure by writing some tests that the default values of BatteryManager are conform to the w3c standards: https://dvcs.w3.org/hg/dap/raw-file/tip/battery/Overview.html#the-batterymanager-interface
Depends on: 1047119
Keywords: meta
Whiteboard: [good first bug][lang=c++]
Blocks: 1047119
No longer depends on: 1047119
Assignee: nobody → baylac.felix
Hi, I would like to fix this bug. This will be my first bug fix so could you please guide me how to go about with this? I'm new to this Thanks
would like to work on this bug and find a fix
I would like to work on this bug.
Assignee: baylac.felix → nobody
@Felix I have tested navigator.battery.charging on Android, Linux (OpenSuse 13.1) and Windws 8.1. Do I have to report it somewhere?
Flags: needinfo?(baylac.felix)
Hi Goranvel, I think that the point of this bug is not only to test manually navigator.charging but also to write some automated tests. I cannot really help you with that, you should ask to :Kanru for further informations.
Flags: needinfo?(baylac.felix)
Assignee: nobody → goranvel
Assignee: goranvel → nobody
Whiteboard: [good first bug][lang=c++] → [good first bug][lang=js
Attached patch test_bug1050746.html (obsolete) — Splinter Review
Wrote a test that checks whether the BatteryManager default values match the ones specified here https://dvcs.w3.org/hg/dap/raw-file/tip/battery/Overview.html#the-batterymanager-interface, it's my first contribution so feedback would be appreciated.
Attachment #8583399 - Flags: review?(kchen)
Comment on attachment 8583399 [details] [diff] [review] test_bug1050746.html Not entirely sure if I submitted this correctly, I have the file in /mozilla-central/dom/battery/test on my build.
Comment on attachment 8583399 [details] [diff] [review] test_bug1050746.html Hi Jack, This is a good start! There are a few items that you could work on: 1. You need to create a patch for review, see [1] 2. The test case should be added to the mochitest.ini file under the same directory 3. Since we are testing the "default" value, we could flip a preference to let navigator.battery always fallback to default value. Search SpecialPowers.pushPrefEnv on DXR will show you how to do that[2] 4. To use the preference introduced in #3 we need to modify BatteryManager.cpp or hal [1]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch [2]: https://dxr.mozilla.org/mozilla-central/search?q=pushPrefEnv If you have any question you could reach me via email, irc or just comment on the bug :)
Attachment #8583399 - Flags: review?(kchen) → feedback+
Assignee: nobody → wpan
Attachment #8583399 - Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8640333 - Flags: review?(bzbarsky)
Comment on attachment 8640333 [details] [diff] [review] 0002-update-test-cases.patch r=me I guess, but this presumably needs to land as part of bug 1047119.
Attachment #8640333 - Flags: review?(bzbarsky) → review+
Patch is included in bug 1050749.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: