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 439375 79feeed4293336089590320a9f30a813fade8e3c
parent 439149 f8ba9c9b401f57b0047ddd6932cb830190865b38
child 439376 533d3a623d9f2049a96c7420daf6a999d0bef69e
child 439383 3c28f722814c4a8761b2787f1805958d4609efab
child 439466 ce471b9cbe5eaf9011318ba0f90297a310c5a19b
child 439482 960d09c496f479a603bdc432719d36b04b39ccdc
child 439483 ae2c50d020c7013a3f953eb41ce51036397a8ad0
child 439521 5b599be224667b3279e81f5a771b2af530582cd8
child 439522 596754eb10e97a7f1ec4245e171b27f89f6e8689
child 439534 b4ba79d73b5b730d131277e16d2839f0c1a41367
child 439535 0d2878a3a3b47dcaaa647f9df3c14c42023c11c1
child 439536 c14216a90398343d7a2bb91c77e5da1f8c2cf8f9
child 439540 43493b6854fe714122c9f261881bf396c25fa8ba
child 439547 358abddde3124b9bb6315ac5a12541811e747ed2
child 439548 bfc68d2fc99267ef295750fd32176e1212027367
child 439554 82d0c9e4b3c24fca90c6b1ded06a36466057d053
child 439556 5366a2b3664ef8704ffca1d9e7626fa383f4bb7e
child 439557 a47ee6ce550db03b07827c6f00c04617eec7f7b5
child 439560 b3ab106b899ad18cdabe18836124d0bd8b670fae
child 439561 e129e1b29e282e9270680bdce4170233b8b883bf
child 439562 b551c0abe84576cde28e9b54322e2605d8f789fa
child 439574 a94ac2219e2028c9231ee21d268695a737309079
child 439575 666ba94052c49234d9474463e884494fc1b3fc56
child 439616 721e76f81d1fa52cd64a2c7b12eee12f20135164
child 439707 2598a93e2e1a27f363af9fdd290cf4184cc51d48
child 439710 57f874281bf9cbb97b6f52bbb3f138b5c35edcc7
child 439716 38eda3522f79d3e682ac53ad2171c2d129adce01
child 439765 a549dd87ecc1fb5a5e49cea39771a9c6c0660062
child 439791 d0fe53b588ca1b016351ba1468fa511304568139
child 440165 7036100db3e0380bebd78058771cdedd74ef47bd
child 440222 131c3588c50a6f286697bb8d48f25a95e81ccbe5
child 440325 59af07b9036f708d099db7c7610d1ce9f30cf76d
child 440504 11975670466e99877a6d0135108c53c2736f3651
child 440553 5b53bda4e10d2cf2a4983cfe1114eda05540584e
child 440742 9e4959bf1abdc275e08a20110dd15e2f8a3c77a6
child 441001 0bc76c0dc3e1fdf0a4b2674e0388f52a6dcde731
child 442395 97dc38f6971b540d70e806279308d2cb9498f45c
child 443233 3de516afbe8d22762d45b6bac6c48be27bab81f3
push id35990
push usermdesimone@mozilla.com
push dateWed, 16 Nov 2016 00:17:00 +0000
reviewersbackout
bugs1304656
milestone53.0a1
backs out775eb155363c1ea8df0de00a3b4b2605320c4a4e
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)