Bug 1304656 - Puppeteers restart method has to pass-through arguments.
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
--- 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)