Bug 1291658 - Marionette should not assume that there is always a processId in the capabilities available. r=automatedtester, a=tomcat, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Wed, 03 Aug 2016 13:46:52 +0200
changeset 347564 7ecbc0f93ff4b7954185ced028a34f7aaa44992d
parent 347563 d519ced01b56e29e91cdfa82f334bb5ddd83119d
child 347565 bc44adff83a874edbb2e86f8d968e51b498b5663
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, tomcat, test-only
bugs1291658
milestone50.0a2
Bug 1291658 - Marionette should not assume that there is always a processId in the capabilities available. r=automatedtester, a=tomcat, a=test-only 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.