summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-11 19:35:58 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-03-11 19:37:15 +0100
commit648b90a719622f575a009e2996648e3b8a8c3192 (patch)
tree27cbff7c1e678da639112f05f9b3aa073e7b5500
parent40054ac944a988e02ca8f3de414581f1e77688d8 (diff)
downloadqutebrowser-648b90a719622f575a009e2996648e3b8a8c3192.tar.gz
qutebrowser-648b90a719622f575a009e2996648e3b8a8c3192.zip
Fix test_preferred_colorscheme_with_dark_mode with QtWebEngine 5.15.4
Fixes #6259
-rw-r--r--tests/end2end/test_invocations.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py
index 38e40f9b7..01014618f 100644
--- a/tests/end2end/test_invocations.py
+++ b/tests/end2end/test_invocations.py
@@ -501,19 +501,21 @@ def test_preferred_colorscheme_with_dark_mode(
quteproc_new.open_path('data/darkmode/prefers-color-scheme.html')
content = quteproc_new.get_content()
- if webengine_versions.webengine == utils.VersionNumber(5, 15, 3):
+ qtwe_version = webengine_versions.webengine
+ xfail = None
+ if utils.VersionNumber(5, 15, 3) <= qtwe_version <= utils.VersionNumber(6):
# https://bugs.chromium.org/p/chromium/issues/detail?id=1177973
# No workaround known.
expected_text = 'Light preference detected.'
# light website color, inverted by darkmode
expected_color = testutils.Color(127, 127, 127)
- xfail = True
- elif webengine_versions.webengine == utils.VersionNumber(5, 15, 2):
+ xfail = "Chromium bug 1177973"
+ elif qtwe_version == utils.VersionNumber(5, 15, 2):
# Our workaround breaks when dark mode is enabled...
# Also, for some reason, dark mode doesn't work on that page either!
expected_text = 'No preference detected.'
expected_color = testutils.Color(0, 170, 0) # green
- xfail = True
+ xfail = "QTBUG-89753"
else:
# Qt 5.14 and 5.15.0/.1 work correctly.
# Hopefully, so does Qt 6.x in the future?
@@ -529,7 +531,7 @@ def test_preferred_colorscheme_with_dark_mode(
assert color == expected_color
if xfail:
# We still do some checks, but we want to mark the test outcome as xfail.
- pytest.xfail("QTBUG-89753")
+ pytest.xfail(xfail)
@pytest.mark.qtwebkit_skip