Robocop tests fail if screen is dimmed

RESOLVED DUPLICATE of bug 1168175

Status

()

Firefox for Android
Testing
RESOLVED DUPLICATE of bug 1168175
3 years ago
2 years ago

People

(Reporter: bnicholson, Unassigned)

Tracking

Trunk
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
I've been frustrated over the past couple of days since Robocop tests would always fail after any period of inactivity on the phone, requiring me to run the tests twice in a row. Turns out that it's due to the screen being dimmed, and the first touch un-dims the screen, but the event doesn't get dispatched.

To prevent this, we should force the screen to stay on during Robocop tests.
(Reporter)

Comment 1

3 years ago
Created attachment 8462241 [details] [diff] [review]
Keep screen on during Robocop tests
Attachment #8462241 - Flags: review?(michael.l.comella)
On all of our production / continuous integration systems, this is done with the WatcherService, http://hg.mozilla.org/mozilla-central/file/613e79262240/build/mobile/sutagent/android/watcher, and applies to all of our tests (mochitests, reftests, etc).
(Reporter)

Comment 3

3 years ago
(In reply to Geoff Brown [:gbrown] from comment #2)
> On all of our production / continuous integration systems, this is done with
> the WatcherService,
> http://hg.mozilla.org/mozilla-central/file/613e79262240/build/mobile/
> sutagent/android/watcher, and applies to all of our tests (mochitests,
> reftests, etc).

Interesting -- so what does that mean for this bug? Should we figure out a way to merge the two approaches somehow? Or should we keep this patch, which will effectively be a no-op on those systems?
(Reporter)

Comment 4

3 years ago
Created attachment 8462263 [details] [diff] [review]
Keep screen on during Robocop tests, v2

Just remembered that we have a runOnUiThreadSync() helper in RobocopUtils, so that makes things simpler.
Attachment #8462241 - Attachment is obsolete: true
Attachment #8462241 - Flags: review?(michael.l.comella)
Attachment #8462263 - Flags: review?(gbrown)
Comment on attachment 8462263 [details] [diff] [review]
Keep screen on during Robocop tests, v2

Review of attachment 8462263 [details] [diff] [review]:
-----------------------------------------------------------------

Installing the WatcherService on local devices is an alternative, but this is more convenient.
Attachment #8462263 - Flags: review?(gbrown) → review+
(Reporter)

Comment 6

3 years ago
https://hg.mozilla.org/integration/fx-team/rev/6fc8606d27d4
I had to back this out in https://hg.mozilla.org/integration/fx-team/rev/06ccd4f28a80 for breaking robocop tests:
https://tbpl.mozilla.org/php/getParsedLog.php?id=44612882&tree=Fx-Team
https://tbpl.mozilla.org/php/getParsedLog.php?id=44613137&tree=Fx-Team
https://tbpl.mozilla.org/php/getParsedLog.php?id=44612950&tree=Fx-Team
Flags: needinfo?(bnicholson)
(Reporter)

Comment 8

3 years ago
Not sure what's going on here, but this isn't really a high priority. Putting this one in my backlog.
Flags: needinfo?(bnicholson)
(Reporter)

Updated

2 years ago
Assignee: bnicholson → nobody

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1168175
You need to log in before you can comment on or make changes to this bug.