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.
--- 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'))