Emulator goes to sleep too quickly; interferes with automated tests

RESOLVED FIXED

Status

Firefox OS
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jgriffin, Unassigned)

Tracking

unspecified

Firefox Tracking Flags

(blocking-basecamp:+)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 609542 [details] [diff] [review]
patch

Currently, the emulator goes to sleep after 60s of inactivity.  If the emulator is in the middle of running an automated test, the test will hang, as the test framework gets suspended when the emulator sleeps.

Presumably there will eventually be a way to modify this at runtime.  Until such a time, this patch increases the screen timeout from 1 min to 5 mins, which should make running automated tests a lot easier.  It also corrects a comment in the code that the pref refers to "minutes"; it should be "seconds".
I think we can use the settings API here.
Depends on: 739500
(Reporter)

Updated

5 years ago
Attachment #609542 - Flags: review?(jones.chris.g)

Comment 2

5 years ago
We should use a different pref js file for the emulator, not change what our phones do.
Comment on attachment 609542 [details] [diff] [review]
patch

I agree with Kan-Ru, this should be a setting.  Chrome-privileged code on startup can detect whether it's running in an emulator and change the setting appropriately.
Attachment #609542 - Flags: review?(jones.chris.g)
Blocking on figuring this out before we release.
blocking-basecamp: --- → +

Comment 5

5 years ago
jgriffin, can you verify that this is still an issue? We used to freeze the emulator whenever we turned the screen off, but that shouldn't be the case anymore.
(Reporter)

Comment 6

5 years ago
Yes, this got fixed a while ago.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.