diff options
author | Jimmy <jimmy@spalge.com> | 2019-03-31 11:38:45 +1300 |
---|---|---|
committer | Jimmy <jimmy@spalge.com> | 2019-03-31 13:08:35 +1300 |
commit | c30648ff4b0f7563c48c8b3cda379c3db735394e (patch) | |
tree | 3918524e4ff7e0b1c05d428d4214b0f5aa0d71eb /tests/unit/browser/test_caret.py | |
parent | b2f3ffcb4c95a4d1c34b5c404df5bcd52e094bdd (diff) | |
download | qutebrowser-c30648ff4b0f7563c48c8b3cda379c3db735394e.tar.gz qutebrowser-c30648ff4b0f7563c48c8b3cda379c3db735394e.zip |
Expose webtab for caret selection tests.
With 5.13 `window.getSelection()` (which we use to find the focused
element) appears to require this expose thing.
See 85f95f6f41567 for the same workaround for hint tests.
https://github.com/qutebrowser/qutebrowser/issues/4592
Diffstat (limited to 'tests/unit/browser/test_caret.py')
-rw-r--r-- | tests/unit/browser/test_caret.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/unit/browser/test_caret.py b/tests/unit/browser/test_caret.py index 1282b978d..0910e15aa 100644 --- a/tests/unit/browser/test_caret.py +++ b/tests/unit/browser/test_caret.py @@ -24,7 +24,7 @@ import textwrap import pytest from PyQt5.QtCore import QUrl -from qutebrowser.utils import usertypes, qtutils +from qutebrowser.utils import usertypes @pytest.fixture @@ -335,12 +335,10 @@ class TestFollowSelected: def expose(self, web_tab): """Expose the web view if needed. - On QtWebKit, or Qt < 5.11 on QtWebEngine, we need to show the tab for - selections to work properly. + On QtWebKit, or Qt < 5.11 and > 5.12 on QtWebEngine, we need to + show the tab for selections to work properly. """ - if (web_tab.backend == usertypes.Backend.QtWebKit or - not qtutils.version_check('5.11', compiled=False)): - web_tab.container.expose() + web_tab.container.expose() def test_follow_selected_without_a_selection(self, qtbot, caret, selection, web_tab, mode_manager): |