summaryrefslogtreecommitdiff
path: root/tests/end2end/features/test_prompts_bdd.py
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-06-25 22:51:48 +0200
committerFlorian Bruhin <git@the-compiler.org>2018-06-25 22:51:48 +0200
commit87778277e012bf931ce15c6b89920c50ea30b589 (patch)
treeedcac29f2dda32c0a614180e285db3d5734318b7 /tests/end2end/features/test_prompts_bdd.py
parent81b3ef937ebf202670c1561429552874ed51d32a (diff)
downloadqutebrowser-87778277e012bf931ce15c6b89920c50ea30b589.tar.gz
qutebrowser-87778277e012bf931ce15c6b89920c50ea30b589.zip
Fix SSL error page tests
Diffstat (limited to 'tests/end2end/features/test_prompts_bdd.py')
-rw-r--r--tests/end2end/features/test_prompts_bdd.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/tests/end2end/features/test_prompts_bdd.py b/tests/end2end/features/test_prompts_bdd.py
index 12d9cbeec..47b449ec1 100644
--- a/tests/end2end/features/test_prompts_bdd.py
+++ b/tests/end2end/features/test_prompts_bdd.py
@@ -20,6 +20,8 @@
import pytest_bdd as bdd
bdd.scenarios('prompts.feature')
+from qutebrowser.utils import qtutils
+
@bdd.when("I load an SSL page")
def load_ssl_page(quteproc, ssl_server):
@@ -46,14 +48,19 @@ def no_prompt_shown(quteproc):
@bdd.then("a SSL error page should be shown")
def ssl_error_page(request, quteproc):
- if not request.config.webengine:
- line = quteproc.wait_for(message='Error while loading *: SSL '
- 'handshake failed')
- line.expected = True
- quteproc.wait_for(message="Changing title for idx * to 'Error "
- "loading page: *'")
- content = quteproc.get_content().strip()
- assert "Unable to load page" in content
+ if request.config.webengine and qtutils.version_check('5.9'):
+ quteproc.wait_for(message="Certificate error: *")
+ content = quteproc.get_content().strip()
+ assert "ERR_INSECURE_RESPONSE" in content
+ else:
+ if not request.config.webengine:
+ line = quteproc.wait_for(message='Error while loading *: SSL '
+ 'handshake failed')
+ line.expected = True
+ quteproc.wait_for(message="Changing title for idx * to 'Error "
+ "loading page: *'")
+ content = quteproc.get_content().strip()
+ assert "Unable to load page" in content
class AbstractCertificateErrorWrapper: