Closed
Bug 854028
Opened 12 years ago
Closed 12 years ago
New mochitests for Power Management API
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: Luqman, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
7.34 KB,
patch
|
kanru
:
review+
|
Details | Diff | Splinter Review |
Some sanity tests for the Power API.
| Reporter | ||
Comment 1•12 years ago
|
||
Attachment #728489 -
Flags: review?(kchen)
Comment 2•12 years ago
|
||
Comment on attachment 728489 [details] [diff] [review]
Power api tests.
Review of attachment 728489 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/power/test/Makefile.in
@@ +19,4 @@
> $(NULL)
>
> MOCHITEST_BROWSER_FILES = \
> + browser_wakelocks.js \
This file is not renamed in this patch right?
::: dom/power/test/test_power_set_screen_enabled.html
@@ +15,5 @@
> + "use strict";
> +
> + function testEnableScreen() {
> + try {
> + navigator.mozPower.screenEnabled = true;
If this is running on a real device then it might suspend the device here. Maybe set navigator.mozPower.cpuSleepAllowed to false first?
| Reporter | ||
Comment 3•12 years ago
|
||
(In reply to Kan-Ru Chen [:kanru] from comment #2)
> Comment on attachment 728489 [details] [diff] [review]
> Power api tests.
>
> Review of attachment 728489 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/power/test/Makefile.in
> @@ +19,4 @@
> > $(NULL)
> >
> > MOCHITEST_BROWSER_FILES = \
> > + browser_wakelocks.js \
>
> This file is not renamed in this patch right?
It is renamed:
>diff --git a/dom/power/test/browser_bug697132.js b/dom/power/test/browser_wakelocks.js
>rename from dom/power/test/browser_bug697132.js
>rename to dom/power/test/browser_wakelocks.js
>
> ::: dom/power/test/test_power_set_screen_enabled.html
> @@ +15,5 @@
> > + "use strict";
> > +
> > + function testEnableScreen() {
> > + try {
> > + navigator.mozPower.screenEnabled = true;
>
> If this is running on a real device then it might suspend the device here.
> Maybe set navigator.mozPower.cpuSleepAllowed to false first?
I'm not sure whether the tests are run on an actual device, but it can't hurt to set this.
| Reporter | ||
Comment 4•12 years ago
|
||
Attachment #728489 -
Attachment is obsolete: true
Attachment #728489 -
Flags: review?(kchen)
Attachment #729067 -
Flags: review?(kchen)
| Reporter | ||
Comment 5•12 years ago
|
||
Here's the try run from Friday:
https://tbpl.mozilla.org/?tree=Try&rev=6c88ce9c75bf
Updated•12 years ago
|
Attachment #729067 -
Flags: review?(kchen) → review+
| Reporter | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 6•12 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•