diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py')
-rw-r--r-- | testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py | 35 |
1 files changed, 35 insertions, 0 deletions
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 new file mode 100644 index 000000000..0dbce1c8f --- /dev/null +++ b/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py @@ -0,0 +1,35 @@ +# 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 firefox_puppeteer import PuppeteerMixin +from marionette_driver import By, Wait +from marionette_driver.errors import MarionetteException +from marionette_harness import MarionetteTestCase + + +class TestUntrustedConnectionErrorPage(PuppeteerMixin, MarionetteTestCase): + + def setUp(self): + super(TestUntrustedConnectionErrorPage, self).setUp() + + self.url = 'https://ssl-selfsigned.mozqa.com' + + def test_untrusted_connection_error_page(self): + self.marionette.set_context('content') + + # In some localized builds, the default page redirects + target_url = self.browser.get_final_url(self.browser.default_homepage) + + self.assertRaises(MarionetteException, self.marionette.navigate, self.url) + + # Wait for the DOM to receive events + time.sleep(1) + + button = self.marionette.find_element(By.ID, "returnButton") + button.click() + + Wait(self.marionette, timeout=self.marionette.timeout.page_load).until( + lambda mn: target_url == self.marionette.get_url()) |