Bug 1293991 - Add remaining process/crash checks for methods of the Marionette class. r=automatedtester, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Wed, 10 Aug 2016 14:18:37 +0200
changeset 347664 85795b91add3b787010e6d89dc5b15b92fe8dd50
parent 347663 65a7a3e61c3af0c22e3c2c30421d2db8443d4b72
child 347665 c8fddbc2ee1d30aa16e635795c520d659a0c8edf
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, test-only
bugs1293991
milestone50.0a2
Bug 1293991 - Add remaining process/crash checks for methods of the Marionette class. r=automatedtester, a=test-only MozReview-Commit-ID: 8FhjkRBxZXR
testing/marionette/client/marionette_driver/marionette.py
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -984,16 +984,17 @@ class Marionette(object):
         original_prefs = {p: self.get_pref(p) for p in prefs}
         self.set_prefs(prefs)
 
         try:
             yield
         finally:
             self.set_prefs(original_prefs)
 
+    @do_process_check
     def enforce_gecko_prefs(self, prefs):
         """
         Checks if the running instance has the given prefs. If not, it will kill the
         currently running instance, and spawn a new instance with the requested preferences.
 
         : param prefs: A dictionary whose keys are preference names.
         """
         if not self.instance:
@@ -1051,16 +1052,17 @@ class Marionette(object):
         try:
             self.raise_for_port(self.wait_for_port())
         except socket.timeout:
             if self.instance.runner.returncode is not None:
                 exc, val, tb = sys.exc_info()
                 self.cleanup()
                 raise exc, 'Requested restart of the application was aborted', tb
 
+    @do_process_check
     def restart(self, clean=False, in_app=False):
         """
         This will terminate the currently running instance, and spawn a new instance
         with the same profile and then reuse the session id when creating a session again.
 
         : param clean: If False the same profile will be used after the restart. Note
                        that the in app initiated restart always maintains the same
                        profile.