Bug 1291658 - Marionette should not assume that there is always a processId in the capabilities available. r?automatedtester
Before Firefox 49.0 there is no processId property available. Given that Firefox ui update tests
have to use the Marionette version from the post build also for the pre build, we currently fail
during in_app restarts for Firefox 48.0 and below.
MozReview-Commit-ID: ILG7JLg0dcS
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -1066,17 +1066,17 @@ class Marionette(object):
else:
self.delete_session()
self.instance.restart(clean=clean)
self.raise_for_port(self.wait_for_port())
self.start_session(session_id=self.session_id)
self.reset_timeouts()
- if in_app:
+ if in_app and self.session.get('processId'):
# In some cases Firefox restarts itself by spawning into a new process group.
# As long as mozprocess cannot track that behavior (bug 1284864) we assist by
# informing about the new process id.
self.instance.runner.process_handler.check_for_detached(self.session['processId'])
def absolute_url(self, relative_url):
'''
Returns an absolute url for files served from Marionette's www directory.