Bug 1247596 - Fix reference to the update type which is part of the patch. r=maja_zf, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Fri, 08 Jul 2016 10:13:26 +0200
changeset 320952 7352ca17d1b7ee0a4e28d099ebe536ef7437b662
parent 320951 24af5e8917a2a3efabc8f1c614c709282fc2d473
child 320953 92ec0fc8583e2a8bf38f0d8e98a3b78cda4eebaa
push id6221
push usercbook@mozilla.com
push dateSun, 17 Jul 2016 08:31:40 +0000
treeherdermozilla-esr52@92ec0fc8583e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf, test-only
bugs1247596
milestone48.0
Bug 1247596 - Fix reference to the update type which is part of the patch. r=maja_zf, a=test-only MozReview-Commit-ID: K0ee3sp428U
testing/firefox-ui/harness/firefox_ui_harness/testcases.py
--- a/testing/firefox-ui/harness/firefox_ui_harness/testcases.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/testcases.py
@@ -153,31 +153,24 @@ class UpdateTestCase(FirefoxTestCase):
         Wait(self.marionette, timeout=self.TIMEOUT_UPDATE_CHECK).until(
             lambda _: about_window.deck.selected_panel not in
             (about_window.deck.check_for_updates, about_window.deck.checking_for_updates),
             message='Check for updates has been finished.')
 
         return about_window.deck.selected_panel != about_window.deck.no_updates_found
 
     def check_update_applied(self):
-        self.updates[self.current_update_index]['build_post'] = self.software_update.build_info
+        """Check that the update has been applied correctly"""
+        update = self.updates[self.current_update_index]
+        update['build_post'] = self.software_update.build_info
 
         about_window = self.browser.open_about_window()
         try:
             update_available = self.check_for_updates(about_window)
 
-            # No further updates should be offered now with the same update type
-            if update_available:
-                self.download_update(about_window, wait_for_finish=False)
-                self.assertNotEqual(self.software_update.active_update.type,
-                                    self.updates[self.current_update_index].type)
-
-            # Check that the update has been applied correctly
-            update = self.updates[self.current_update_index]
-
             # The upgraded version should be identical with the version given by
             # the update and we shouldn't have run a downgrade
             check = self.marionette.execute_script("""
               Components.utils.import("resource://gre/modules/Services.jsm");
 
               return  Services.vc.compare(arguments[0], arguments[1]);
             """, script_args=[update['build_post']['version'], update['build_pre']['version']])
 
@@ -197,16 +190,27 @@ class UpdateTestCase(FirefoxTestCase):
 
             # An upgrade should not change the builds locale
             self.assertEqual(update['build_post']['locale'], update['build_pre']['locale'])
 
             # Check that no application-wide add-ons have been disabled
             self.assertEqual(update['build_post']['disabled_addons'],
                              update['build_pre']['disabled_addons'])
 
+            # Bug 604364 - We do not support watershed releases yet.
+            if update_available:
+                self.download_update(about_window, wait_for_finish=False)
+                self.assertNotEqual(self.software_update.active_update.type,
+                                    update['patch']['type'],
+                                    'No further update of the same type gets offered: '
+                                    '{0} != {1}'.format(
+                                        self.software_update.active_update.type,
+                                        update['patch']['type']
+                                    ))
+
             update['success'] = True
 
         finally:
             about_window.close()
 
     def download_update(self, window, wait_for_finish=True, timeout=TIMEOUT_UPDATE_DOWNLOAD):
         """ Download the update patch.