summaryrefslogtreecommitdiffstats
path: root/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/firefox-ui/tests/functional/security/test_unknown_issuer.py
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-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_unknown_issuer.py')
-rw-r--r--testing/firefox-ui/tests/functional/security/test_unknown_issuer.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py b/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py
new file mode 100644
index 000000000..b329f2500
--- /dev/null
+++ b/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py
@@ -0,0 +1,34 @@
+# 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.errors import MarionetteException
+from marionette_harness import MarionetteTestCase
+
+
+class TestUnknownIssuer(MarionetteTestCase):
+
+ def setUp(self):
+ super(TestUnknownIssuer, self).setUp()
+
+ self.url = 'https://ssl-unknownissuer.mozqa.com'
+
+ def test_unknown_issuer(self):
+ with self.marionette.using_context('content'):
+ # Go to a site that has a cert with an unknown issuer
+ self.assertRaises(MarionetteException, self.marionette.navigate, self.url)
+
+ # Wait for the DOM to receive events
+ time.sleep(1)
+
+ # Check for the correct error code
+ error = self.marionette.find_element(By.ID, 'errorCode')
+ self.assertEquals(error.get_property('textContent'),
+ 'SEC_ERROR_UNKNOWN_ISSUER')
+
+ # Verify the "Go Back" and "Advanced" buttons appear
+ self.assertIsNotNone(self.marionette.find_element(By.ID, 'returnButton'))
+ self.assertIsNotNone(self.marionette.find_element(By.ID, 'advancedButton'))