diff --git a/testing/firefox-ui/tests/functional/security/test_dv_certificate.py b/testing/firefox-ui/tests/functional/security/test_dv_certificate.py index 565f64996e0a..0a944cf9886b 100644 --- a/testing/firefox-ui/tests/functional/security/test_dv_certificate.py +++ b/testing/firefox-ui/tests/functional/security/test_dv_certificate.py @@ -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')) diff --git a/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py b/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py index b146a904c8c3..fd490fca7cdb 100644 --- a/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py +++ b/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py @@ -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: diff --git a/testing/firefox-ui/tests/functional/security/test_mixed_script_content_blocking.py b/testing/firefox-ui/tests/functional/security/test_mixed_script_content_blocking.py index 796b1dc293fb..8bcab1d4298d 100644 --- a/testing/firefox-ui/tests/functional/security/test_mixed_script_content_blocking.py +++ b/testing/firefox-ui/tests/functional/security/test_mixed_script_content_blocking.py @@ -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'), diff --git a/testing/firefox-ui/tests/functional/security/test_security_notification.py b/testing/firefox-ui/tests/functional/security/test_security_notification.py index 5825d0364861..b466e3f8e8fd 100644 --- a/testing/firefox-ui/tests/functional/security/test_security_notification.py +++ b/testing/firefox-ui/tests/functional/security/test_security_notification.py @@ -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 diff --git 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 index d1d9c531f333..59baccd5cccf 100644 --- 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 @@ -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')) diff --git a/testing/firefox-ui/tests/functional/security/test_ssl_status_after_restart.py b/testing/firefox-ui/tests/functional/security/test_ssl_status_after_restart.py index 85ca96f50f08..2bbdad29bf86 100644 --- a/testing/firefox-ui/tests/functional/security/test_ssl_status_after_restart.py +++ b/testing/firefox-ui/tests/functional/security/test_ssl_status_after_restart.py @@ -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' } ) diff --git a/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py b/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py index 34fb020a9a56..799d3f9b2545 100644 --- a/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py +++ b/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py @@ -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()) diff --git a/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py b/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py index b329f25005f0..113569da6112 100644 --- a/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py +++ b/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py @@ -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'): diff --git a/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py b/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py index a88cb6946752..2de0c35b7416 100644 --- a/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py +++ b/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py @@ -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)