Closed Bug 1098370 Opened 10 years ago Closed 6 years ago

[marionette-js] system/test/marionette/lib/lockscreen.js is racy and causes bad side effects

Categories

(Firefox OS Graveyard :: Gaia::System::Lockscreen, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: etienne, Unassigned)

Details

Looking at the hierarchy_manage_test.js, which has the lockscreen enabled and calls |lockscreen.unlock()| in the setup.

-> we end up in a bad state where the lockscreen is not displayed but is still capturing |home| events :/

Took me a while to figure out...

Calling |lockscreen.lock()| then |lockscreen.unlock()| fixes the issue.

Might have a race where we keep the default value of |this.locked| in |lockscreen.js| (true) and keep calling stopImmediatePropagration on the events.
Nope, this doesn't fix the issue...
Etienne, I was just looking at this same issue in bug 1088157. The work for 2.2/master is in bug 1098997. I tried writing a marionette test but could never reproduce the same race condition that triggers this on device, so my test passed with or without the fix.
FYI I think https://bugzilla.mozilla.org/show_bug.cgi?id=1096133 will fix the home event handling stuff.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.