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)
Core
DOM: Device Interfaces
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)
17.31 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
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
Reporter | ||
Updated•10 years ago
|
Reporter | ||
Updated•10 years ago
|
Updated•10 years ago
|
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
Reporter | ||
Updated•10 years ago
|
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)
Reporter | ||
Comment 5•10 years ago
|
||
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)
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → goranvel
Updated•10 years ago
|
Assignee: goranvel → nobody
Whiteboard: [good first bug][lang=c++] → [good first bug][lang=js
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 8•10 years ago
|
||
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 | ||
Comment 9•9 years ago
|
||
Assignee: nobody → wpan
Attachment #8583399 -
Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8640333 -
Flags: review?(bzbarsky)
Comment 10•9 years ago
|
||
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+
Assignee | ||
Comment 11•9 years ago
|
||
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.
Description
•