Bug 1247596 - Fix reference to the update type which is part of the patch. r?maja_zf
MozReview-Commit-ID: K0ee3sp428U
--- 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.