The Phone and Contacts app both have the same manifestURL, e.g. app://communications.gaiamobile.org/manifest.webapp That means that wait_to_be_displayed/wait_to_not_be_displayed are not working well in that case, because that only checks for manifestURL, which means that either the Phone or Contacts app can be displayed. The check should include the entry_point for the app object, if it's there. But I don't think that's currently in the GaiaApps.getDisplayedApp in gaia_apps.js, so it would need to be added there, as well, in some way. I guess if bug 1135340 gets fixed, then this isn't needed anymore.
This is potentially a problem here: http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_dialer_add_contact.py#41 http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_form.py#214 Except there, the wait_to_be_displayed()/wait_to_not_be_displayed() call is not implemented there.
window.Service.query('getTopMostWindow') in the system app returns a whole bunch, but I don't see anything with entryPoint in it. It looks like the .manifest.launch_path:"/dialer/index.html#keyboard-view" is what we need. For contacts, it's: launch_path:"/contacts/index.html"
Comment on attachment 8669938 [details] [review] [gaia] mwargers:1204894 > mozilla-b2g:master So something like this, I think. Please ignore the console.log calls for now, I'll remove those. I didn't fix this for installed_apps and running_apps for now, it's not really needed for here, really. The thing in tap_done in contact_form.py also could use improvement, but I'll leave that for now as well.
Attachment #8669938 - Flags: feedback?(jlorenzo)
Comment on attachment 8669938 [details] [review] [gaia] mwargers:1204894 > mozilla-b2g:master I'm not sure the case where an app has no entry point is correctly handled (see comments in PR), but that's the way to go, I believe.
Attachment #8669938 - Flags: feedback?(jlorenzo) → feedback+
Comment on attachment 8669938 [details] [review] [gaia] mwargers:1204894 > mozilla-b2g:master Ok, updated the pull request, removed the prints/console.logs and added one check, so it works for browser too. Regarding your comment in the pull request, I don't think we need the extra null check for entryPoint, because we also pass null when entryPoint doesn't exist, see: http://mxr.mozilla.org/gaia/source/tests/atoms/gaia_apps.js#308 308 app.launch(entryPoint || null);
Attachment #8669938 - Flags: review?(jlorenzo)
Comment on attachment 8669938 [details] [review] [gaia] mwargers:1204894 > mozilla-b2g:master Looks fine to me. There is one small nit I noticed while running adb logcat. It's not blocker though. I tested with Gallery (no entry point), Dialer and Conctacts, they were lunching fine and the logs (once corrected) looked coherent.
Attachment #8669938 - Flags: review+ → review?(jlorenzo)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.