Back out revision 775eb155363c (bug 1304656) for causing regressions in update tests a=backout
authorWes Kocher <wkocher@mozilla.com>
Tue, 15 Nov 2016 15:25:35 -0800
changeset 322573 79feeed4293336089590320a9f30a813fade8e3c
parent 322572 f8ba9c9b401f57b0047ddd6932cb830190865b38
child 322654 2598a93e2e1a27f363af9fdd290cf4184cc51d48
push id30957
push userkwierso@gmail.com
push dateTue, 15 Nov 2016 23:25:59 +0000
treeherdermozilla-central@79feeed42933 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1304656
milestone53.0a1
backs out775eb155363c1ea8df0de00a3b4b2605320c4a4e
first release with
nightly linux32
79feeed42933 / 53.0a1 / 20161116030212 / files
nightly linux64
79feeed42933 / 53.0a1 / 20161116030212 / files
nightly mac
79feeed42933 / 53.0a1 / 20161116030212 / files
nightly win32
79feeed42933 / 53.0a1 / 20161116030212 / files
nightly win64
79feeed42933 / 53.0a1 / 20161116030212 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Back out revision 775eb155363c (bug 1304656) for causing regressions in update tests a=backout
testing/firefox-ui/harness/firefox_ui_harness/testcases.py
testing/puppeteer/firefox/firefox_puppeteer/mixins.py
--- a/testing/firefox-ui/harness/firefox_ui_harness/testcases.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/testcases.py
@@ -300,17 +300,17 @@ class UpdateTestCase(PuppeteerMixin, Mar
         finally:
             self.updates[self.current_update_index]['patch'] = self.patch_info
 
         if force_fallback:
             # Set the downloaded update into failed state
             self.software_update.force_fallback()
 
         # Restart Firefox to apply the downloaded update
-        self.restart(callback=lambda: about_window.deck.apply.button.click())
+        self.restart()
 
     def download_and_apply_forced_update(self):
         # The update wizard dialog opens automatically after the restart but with a short delay
         dialog = Wait(self.marionette, ignored_exceptions=[NoSuchWindowException]).until(
             lambda _: self.puppeteer.windows.switch_to(lambda win: type(win) is UpdateWizardDialog)
         )
 
         # In case of a broken complete update the about window has to be used
@@ -327,34 +327,33 @@ class UpdateTestCase(PuppeteerMixin, Mar
                 self.assertTrue(update_available,
                                 'Available update has been found')
 
                 # Download update and wait until it has been applied
                 self.download_update(about_window)
                 self.wait_for_update_applied(about_window)
 
             finally:
-                self.updates[self.current_update_index]['patch'] = self.patch_info
-
-            # Restart Firefox to apply the forced update
-            self.restart(callback=lambda: about_window.deck.apply.button.click())
+                if about_window:
+                    self.updates[self.current_update_index]['patch'] = self.patch_info
 
         else:
             try:
                 self.assertEqual(dialog.wizard.selected_panel,
                                  dialog.wizard.error_patching)
 
                 # Start downloading the fallback update
                 self.download_update(dialog)
+                dialog.close()
 
             finally:
                 self.updates[self.current_update_index]['patch'] = self.patch_info
 
-            # Restart Firefox to apply the forced update
-            self.restart(callback=lambda: dialog.wizard.finish_button.click())
+        # Restart Firefox to apply the update
+        self.restart()
 
     def read_update_log(self):
         """Read the content of the update log file for the last update attempt."""
         path = os.path.join(os.path.dirname(self.software_update.staging_directory),
                             'last-update.log')
         try:
             with open(path, 'rb') as f:
                 return f.read().splitlines()
--- a/testing/puppeteer/firefox/firefox_puppeteer/mixins.py
+++ b/testing/puppeteer/firefox/firefox_puppeteer/mixins.py
@@ -60,17 +60,20 @@ class PuppeteerMixin(object):
             self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
             self.browser.tabbar.tabs[0].switch_to()
 
     def restart(self, **kwargs):
         """Restart Firefox and re-initialize data.
 
         :param flags: Specific restart flags for Firefox
         """
-        self.marionette.restart(in_app=not kwargs.get('clean'), **kwargs)
+        if kwargs.get('clean'):
+            self.marionette.restart(clean=True)
+        else:
+            self.marionette.restart(in_app=True)
 
         # 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)