summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pytest.ini1
-rw-r--r--tests/end2end/conftest.py10
-rw-r--r--tests/end2end/features/qutescheme.feature1
3 files changed, 11 insertions, 1 deletions
diff --git a/pytest.ini b/pytest.ini
index a034a27b3..1235efb4b 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -38,6 +38,7 @@ markers =
unicode_locale: Tests which need an unicode locale to work
qtwebkit6021_xfail: Tests which would fail on WebKit version 602.1
js_headers: Sets JS headers dynamically on QtWebEngine (unsupported on some versions)
+ qtwebkit_pdf_imageformat_skip: Broken on QtWebKit with PDF image format plugin installed
qt_log_level_fail = WARNING
qt_log_ignore =
^SpellCheck: .*
diff --git a/tests/end2end/conftest.py b/tests/end2end/conftest.py
index f87b84a56..43105d6cb 100644
--- a/tests/end2end/conftest.py
+++ b/tests/end2end/conftest.py
@@ -28,9 +28,10 @@ import sys
import shutil
import pstats
import operator
+import pathlib
import pytest
-from PyQt5.QtCore import PYQT_VERSION
+from PyQt5.QtCore import PYQT_VERSION, QCoreApplication
pytest.register_assert_rewrite('end2end.fixtures')
@@ -142,6 +143,9 @@ def pytest_collection_modifyitems(config, items):
header_bug_fixed = (not qtutils.version_check('5.12', compiled=False) or
qtutils.version_check('5.15', compiled=False))
+ lib_path = pathlib.Path(QCoreApplication.libraryPaths()[0])
+ qpdf_image_plugin = lib_path / 'imageformats' / 'libqpdf.so'
+
markers = [
('qtwebengine_todo', 'QtWebEngine TODO', pytest.mark.xfail,
config.webengine),
@@ -160,6 +164,10 @@ def pytest_collection_modifyitems(config, items):
('js_headers', 'Sets headers dynamically via JS',
pytest.mark.skipif,
config.webengine and not header_bug_fixed),
+ ('qtwebkit_pdf_imageformat_skip',
+ 'Skipped with QtWebKit if PDF image plugin is available',
+ pytest.mark.skipif,
+ not config.webengine and qpdf_image_plugin.exists()),
]
for item in items:
diff --git a/tests/end2end/features/qutescheme.feature b/tests/end2end/features/qutescheme.feature
index 2325912c5..55e366b4f 100644
--- a/tests/end2end/features/qutescheme.feature
+++ b/tests/end2end/features/qutescheme.feature
@@ -177,6 +177,7 @@ Feature: Special qute:// pages
And I open data/misc/test.pdf without waiting
Then the javascript message "PDF * [*] (PDF.js: *)" should be logged
+ @qtwebkit_pdf_imageformat_skip
Scenario: pdfjs is not used when disabled
When I set content.pdfjs to false
And I set downloads.location.prompt to false