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.

--HG--
extra : rebase_source : aa8e34fbf5778df6eef2a35b3907c1174c9886a1
This commit is contained in:
Henrik Skupin 2016-05-27 14:20:58 +02:00
Родитель a755ba2261
Коммит fc459911d3
1 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -4,7 +4,7 @@
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
@ -38,12 +38,16 @@ class TestSSLDisabledErrorPage(FirefoxTestCase):
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'))