Bug 1291658 - Marionette should not assume that there is always a processId in the capabilities available. r?automatedtester draft
authorHenrik Skupin <mail@hskupin.info>
Wed, 03 Aug 2016 13:46:52 +0200
changeset 396131 34d5712d2839c061b0c1ac56d816ac7c4184348a
parent 395624 6608e5864780589b25d5421c3d3673ab30c4c318
child 527138 18b120689a4c78526a09044e7dc1dd6aa39e09ba
push id24932
push userbmo:hskupin@gmail.com
push dateWed, 03 Aug 2016 11:52:46 +0000
reviewersautomatedtester
bugs1291658
milestone51.0a1
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
testing/marionette/client/marionette_driver/marionette.py
--- 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.