Last Comment Bug 739476 - Emulator goes to sleep too quickly; interferes with automated tests
: Emulator goes to sleep too quickly; interferes with automated tests
Product: Firefox OS
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on: 739500
  Show dependency treegraph
Reported: 2012-03-26 17:00 PDT by Jonathan Griffin (:jgriffin)
Modified: 2012-07-13 11:04 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

patch (511 bytes, patch)
2012-03-26 17:00 PDT, Jonathan Griffin (:jgriffin)
no flags Details | Diff | Splinter Review

Description User image Jonathan Griffin (:jgriffin) 2012-03-26 17:00:53 PDT
Created attachment 609542 [details] [diff] [review]

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".
Comment 1 User image Kan-Ru Chen [:kanru] (UTC+8) 2012-03-26 18:48:20 PDT
I think we can use the settings API here.
Comment 2 User image Andreas Gal :gal 2012-03-30 11:32:54 PDT
We should use a different pref js file for the emulator, not change what our phones do.
Comment 3 User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-03-30 16:17:38 PDT
Comment on attachment 609542 [details] [diff] [review]

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.
Comment 4 User image Johnny Stenback (:jst, 2012-07-13 10:55:06 PDT
Blocking on figuring this out before we release.
Comment 5 User image Michael Wu [:mwu] 2012-07-13 10:57:47 PDT
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.
Comment 6 User image Jonathan Griffin (:jgriffin) 2012-07-13 11:04:29 PDT
Yes, this got fixed a while ago.

Note You need to log in before you can comment on or make changes to this bug.