Bug 1276175 - Check the new reset prefs button for a disabled SSL error page. r=maja_zf
authorHenrik Skupin <mail@hskupin.info>
Fri, 27 May 2016 14:20:58 +0200
changeset 338336 0fe273ea18a7ede1e73378ba67d437a7f206fe7d
parent 338335 fe4047cacc0b4b442335ce76440b827abe7562f7
child 338337 cbb4a840f81ed3e560d6395f61ad15f3a7c01e7e
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1276175
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1276175 - Check the new reset prefs button for a disabled SSL error page. r=maja_zf MozReview-Commit-ID: 94VhdJgF9b8 If SSL related preferences have been changed the retry button is no longer shown. Instead you see a button to reset the preferences, and which will reload the page.
testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py
--- a/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py
+++ b/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import time
 
-from marionette_driver import By
+from marionette_driver import By, expected, Wait
 from marionette_driver.errors import MarionetteException
 
 from firefox_ui_harness.testcases import FirefoxTestCase
 
 
 class TestSSLDisabledErrorPage(FirefoxTestCase):
 
     def setUp(self):
@@ -33,17 +33,21 @@ class TestSSLDisabledErrorPage(FirefoxTe
             # Wait for the DOM to receive events
             time.sleep(1)
 
             # Verify "Secure Connection Failed" error page title
             title = self.marionette.find_element(By.CLASS_NAME, 'title-text')
             nss_failure2title = self.browser.get_entity('nssFailure2.title')
             self.assertEquals(title.get_property('textContent'), nss_failure2title)
 
-            # Verify "Try Again" button appears
-            try_again_button = self.marionette.find_element(By.ID, 'errorTryAgain')
-            self.assertTrue(try_again_button.is_displayed())
-
             # Verify the error message is correct
             short_description = self.marionette.find_element(By.ID, 'errorShortDescText')
             self.assertIn('SSL_ERROR_UNSUPPORTED_VERSION',
                           short_description.get_property('textContent'))
             self.assertIn('mozqa.com', short_description.get_property('textContent'))
+
+            # Verify that the "Restore" button appears and works
+            reset_button = self.marionette.find_element(By.ID, 'prefResetButton')
+            reset_button.click()
+
+            # With the preferences reset, the page has to load correctly
+            Wait(self.marionette).until(expected.element_present(By.LINK_TEXT,
+                                                                 'http://quality.mozilla.org'))