Closed Bug 1024433 Opened 7 years ago Closed 7 years ago

Displayed atom does not account for activityWindow

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zcampbell, Assigned: zcampbell)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
davehunt
: review+
Details | Review
The atom does not take into account activityWindow, but it can also contain an app.

With a small change to the atom I think we can have it deal with these scenarios.
Blocks: 1019902
Attached file github pr
Attachment #8439178 - Flags: review?(dave.hunt)
Sorry Dave my original comment was a bit vague.. 

An app can load another app inside an activityWindow. In that case the atom returns the underlying app but that is not the one in focus to the user.
This variation will return the app that's in focus to the user.

This structure of this is best observed from the App Manager using a Collection installed with everything.me.
Comment on attachment 8439178 [details] [review]
github pr

This looks okay to me, but might be worth asking Alive to take a look too.
Attachment #8439178 - Flags: review?(dave.hunt)
Attachment #8439178 - Flags: review?(alive)
Attachment #8439178 - Flags: review+
Comment on attachment 8439178 [details] [review]
github pr

var activeTop = app;
while (activeTop.frontWindow && activeTop.frontWindow.isActive()) {
  activeTop = activeTop.frontWindow;
}
return activeTop;

I guess one day I will put this in AppWindow but for now you need to manually find the active most top one.
Attachment #8439178 - Flags: review?(alive)
Thanks Alive, superstar!
Adhoc job with Alive's change:
http://selenium.qa.mtv2.mozilla.com:8080/job/b2g.flame.mozilla-central.ui.adhoc/28

(I verified the unit tests locally).
Comment on attachment 8439178 [details] [review]
github pr

Modified to use Alive's snippet.
Attachment #8439178 - Flags: review+ → review?(dave.hunt)
Attachment #8439178 - Flags: review?(dave.hunt) → review+
Merged:
https://github.com/mozilla-b2g/gaia/commit/83392cae2c964fa6f8a97ac3fc515c3f94ef3c1c
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Blocks: 1026424
You need to log in before you can comment on or make changes to this bug.