Bug 1304656 - Puppeteers restart method has to pass-through arguments. r=maja_zf, a=test-only
☠☠ backed out by a1ff0d20ca0b ☠ ☠
authorHenrik Skupin <mail@hskupin.info>
Tue, 18 Apr 2017 23:54:13 +0200
changeset 396007 b992c7c7fa043105a405964e5555a6f4ef616efe
parent 396006 d5fe7a284cf1c77bc7a258f85f80ba80a051ae0d
child 396008 ee39b53a33c0f1c908f4dc0499d71420d1a40974
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf, test-only
bugs1304656
milestone54.0
Bug 1304656 - Puppeteers restart method has to pass-through arguments. r=maja_zf, a=test-only Puppeteer enforces to use an in_app restart, unless the clean argument is set to True. But whatever case is present, all passed in arguments have to be forwarded to Marionette. MozReview-Commit-ID: ADPRvuXhyXh
testing/marionette/puppeteer/firefox/firefox_puppeteer/mixins.py
--- a/testing/marionette/puppeteer/firefox/firefox_puppeteer/mixins.py
+++ b/testing/marionette/puppeteer/firefox/firefox_puppeteer/mixins.py
@@ -55,25 +55,26 @@ class PuppeteerMixin(object):
             # tests a proper start condition and make them not fail.
             self.puppeteer.windows.close_all([self.browser])
             self.browser.focus()
 
             # Also close all remaining tabs
             self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
             self.browser.tabbar.tabs[0].switch_to()
 
-    def restart(self, **kwargs):
+    def restart(self, *args, **kwargs):
         """Restart Firefox and re-initialize data.
 
         :param flags: Specific restart flags for Firefox
         """
-        if kwargs.get('clean'):
-            self.marionette.restart(clean=True)
-        else:
-            self.marionette.restart(in_app=True)
+        # If no clean restart is requested, always use an in_app one
+        if not kwargs.get('clean'):
+            kwargs.update({"in_app": True})
+
+        self.marionette.restart(*args, **kwargs)
 
         # Ensure that we always have a valid browser instance available
         self.browser = self.puppeteer.windows.switch_to(lambda win: type(win) is BrowserWindow)
 
     def setUp(self, *args, **kwargs):
         super(PuppeteerMixin, self).setUp(*args, **kwargs)
 
         self._start_handle_count = len(self.marionette.window_handles)