Bug 1414776 - [fxui] Change testcases from mozqa.com to badssl.com and mixed-content-tests-mozilla.org. r=maja_zf

MozReview-Commit-ID: 1iD8HUShPZF

--HG--
extra : rebase_source : 057705bc517ef659cfd2cb9dbdee2eea3e83c5cd
This commit is contained in:
Henrik Skupin 2018-02-09 15:09:21 +01:00
Родитель 526c8d5347
Коммит d96e8560e6
9 изменённых файлов: 24 добавлений и 28 удалений

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

@ -15,7 +15,7 @@ class TestDVCertificate(PuppeteerMixin, MarionetteTestCase):
self.locationbar = self.browser.navbar.locationbar
self.identity_popup = self.browser.navbar.locationbar.identity_popup
self.url = 'https://ssl-dv.mozqa.com'
self.url = 'https://mozilla-intermediate.badssl.com'
def tearDown(self):
try:
@ -41,8 +41,9 @@ class TestDVCertificate(PuppeteerMixin, MarionetteTestCase):
cert = self.browser.tabbar.selected_tab.certificate
# The shown host equals to the certificate
self.assertEqual(self.identity_popup.view.main.host.get_property('textContent'),
cert['commonName'])
self.assertRegexpMatches(self.identity_popup.view.main.host.get_property('textContent'),
'.*badssl\.com$')
self.assertRegexpMatches(cert['commonName'], '.*badssl\.com$')
# Only the secure label is visible in the main view
secure_label = self.identity_popup.view.main.secure_connection_label
@ -75,8 +76,8 @@ class TestDVCertificate(PuppeteerMixin, MarionetteTestCase):
self.assertEqual(deck.selected_panel, deck.security)
self.assertEqual(deck.security.domain.get_property('value'),
cert['commonName'])
self.assertRegexpMatches(deck.security.domain.get_property('value'),
'.*badssl\.com$')
self.assertEqual(deck.security.owner.get_property('value'),
page_info_window.localize_property('securityNoOwner'))

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

@ -7,6 +7,7 @@ from marionette_harness import MarionetteTestCase
class TestMixedContentPage(PuppeteerMixin, MarionetteTestCase):
def setUp(self):
super(TestMixedContentPage, self).setUp()
@ -14,7 +15,7 @@ class TestMixedContentPage(PuppeteerMixin, MarionetteTestCase):
self.locationbar = self.browser.navbar.locationbar
self.identity_popup = self.locationbar.identity_popup
self.url = 'https://mozqa.com/data/firefox/security/mixedcontent.html'
self.url = 'https://mixed.badssl.com'
def tearDown(self):
try:

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

@ -12,7 +12,7 @@ class TestMixedScriptContentBlocking(PuppeteerMixin, MarionetteTestCase):
def setUp(self):
super(TestMixedScriptContentBlocking, self).setUp()
self.url = 'https://mozqa.com/data/firefox/security/mixed_content_blocked/index.html'
self.url = 'https://mixed-content-tests-mozilla.org/mozqa/mixed_content_blocked/'
self.test_elements = [
('result1', 'Insecure script one'),

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

@ -17,11 +17,11 @@ class TestSecurityNotification(PuppeteerMixin, MarionetteTestCase):
self.urls = [
# Invalid cert page
'https://ssl-expired.mozqa.com',
'https://expired.badssl.com',
# Secure page
'https://ssl-ev.mozqa.com/',
'https://ssl-ev.mozqa.com',
# Insecure page
'http://no-ssl.mozqa.com'
'http://http.badssl.com'
]
self.identity_box = self.browser.navbar.locationbar.identity_box

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

@ -15,7 +15,7 @@ class TestSSLDisabledErrorPage(PuppeteerMixin, MarionetteTestCase):
def setUp(self):
super(TestSSLDisabledErrorPage, self).setUp()
self.url = 'https://tlsv1-0.mozqa.com'
self.url = 'https://tls-v1-0.badssl.com:1010'
self.puppeteer.utils.sanitize({"sessions": True})
@ -49,12 +49,12 @@ class TestSSLDisabledErrorPage(PuppeteerMixin, MarionetteTestCase):
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, timeout=self.marionette.timeout.page_load).until(
expected.element_present(By.LINK_TEXT, 'http://quality.mozilla.org'))
el = Wait(self.marionette, timeout=self.marionette.timeout.page_load).until(
expected.element_present(By.TAG_NAME, 'h1'))
self.assertIn('tls-v1-0', el.get_property('innerText'))

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

@ -14,7 +14,7 @@ class TestSSLStatusAfterRestart(PuppeteerMixin, MarionetteTestCase):
self.test_data = (
{
'url': 'https://ssl-dv.mozqa.com',
'url': 'https://mozilla-intermediate.badssl.com',
'identity': '',
'type': 'secure'
},
@ -22,11 +22,6 @@ class TestSSLStatusAfterRestart(PuppeteerMixin, MarionetteTestCase):
'url': 'https://ssl-ev.mozqa.com/',
'identity': 'Mozilla Corporation',
'type': 'secure-ev'
},
{
'url': 'https://ssl-ov.mozqa.com/',
'identity': '',
'type': 'secure'
}
)

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

@ -14,7 +14,7 @@ class TestSubmitUnencryptedInfoWarning(PuppeteerMixin, MarionetteTestCase):
def setUp(self):
super(TestSubmitUnencryptedInfoWarning, self).setUp()
self.url = 'https://ssl-dv.mozqa.com/data/firefox/security/unencryptedsearch.html'
self.url = 'https://mixed-form.badssl.com/'
self.test_string = 'mozilla'
# Disable rcwn to make cache behavior deterministic
@ -33,8 +33,8 @@ class TestSubmitUnencryptedInfoWarning(PuppeteerMixin, MarionetteTestCase):
self.marionette.navigate(self.url)
# Get the page's search box and submit button.
searchbox = self.marionette.find_element(By.ID, 'q')
button = self.marionette.find_element(By.ID, 'submit')
searchbox = self.marionette.find_element(By.ID, 'value')
button = self.marionette.find_element(By.CSS_SELECTOR, 'button')
# Use the page's search box to submit information.
searchbox.send_keys(self.test_string)
@ -63,6 +63,5 @@ class TestSubmitUnencryptedInfoWarning(PuppeteerMixin, MarionetteTestCase):
' document.readyState == "complete";')
)
# Check that search_term contains the test string.
search_term = self.marionette.find_element(By.ID, 'search-term')
self.assertEqual(search_term.get_property('textContent'), self.test_string)
self.assertEqual('http://http.badssl.com/resources/form-submitted.html',
self.marionette.get_url())

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

@ -14,7 +14,7 @@ class TestUnknownIssuer(MarionetteTestCase):
def setUp(self):
super(TestUnknownIssuer, self).setUp()
self.url = 'https://ssl-unknownissuer.mozqa.com'
self.url = 'https://untrusted-root.badssl.com/'
def test_unknown_issuer(self):
with self.marionette.using_context('content'):

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

@ -15,7 +15,7 @@ class TestUntrustedConnectionErrorPage(PuppeteerMixin, MarionetteTestCase):
def setUp(self):
super(TestUntrustedConnectionErrorPage, self).setUp()
self.url = 'https://ssl-selfsigned.mozqa.com'
self.url = 'https://self-signed.badssl.com'
# Disable rcwn to make cache behavior deterministic
self.marionette.set_pref('network.http.rcwn.enabled', False)