Update launch atom to check if the app is running, but not displayed



4 years ago
4 years ago


(Reporter: viorela, Unassigned)


Firefox Tracking Flags

(Not tracked)




4 years ago
In our launch atom there's a scenario that it's not considered and that is causing one of our automated test to fail. That is the case when the app is running, but it is not displayed on the screen.
For now, we are only checking if the app is displayed (https://github.com/mozilla-b2g/gaia/blob/master/tests/atoms/gaia_apps.js#L277), and launch the app if that condition is false.
We need to add another condition that checks if the app is running in the background - it's among the running apps - and in that case we should bring it to front.
The test that is failing because of this issue is test_cost_control_reset_wifi.py, while trying to launch Cost control app for the second time.
We added a workaround in Bug 1068724.
It shouldn't matter if the app is running but not displayed. Launching an app that's running will bring the app into focus, making it the active app. We even have a unit test for this: https://github.com/mozilla-b2g/gaia/blob/055c380b17ae0b7e18f4886d3988eca96d6c2048/tests/python/gaia-ui-tests/gaiatest/tests/unit/test_warm_launch.py
Last Resolved: 4 years ago
Resolution: --- → INVALID

Comment 2

4 years ago
The bug description here doesn't perfectly describe the problem.

The issue is that when we use an app sometimes we may change its URL/iframe's src while using it. In the scenario Viorela encountered, the Cost Control app's URL was changing with an anchor tag on the end of it after part of the app was navigated to.

Thus, when the app was launched the second time (although it was only open in the background), the atom's expected launch_path does not match the src of the app and the atom times out. The atom can only handle the default expected launch path, not that of a running app.

test_warm_launch would not catch this because there is no navigation done after launching the app.

Hard to describe; does this make sense Dave? Do you want to re-open?
Flags: needinfo?(dave.hunt)
I've spoken to Viorela about this, she's going to open a new bug and already has an idea for a fix.
Flags: needinfo?(dave.hunt)
You need to log in before you can comment on or make changes to this bug.