Make caret unittests run with QtWebKit

This commit is contained in:
Florian Bruhin 2018-09-08 13:22:17 +02:00
parent 03dea493de
commit 5978605873
2 changed files with 5 additions and 1 deletions

View File

@ -154,7 +154,8 @@ def greasemonkey_manager(data_tmpdir):
@pytest.fixture
def webkit_tab(qtbot, tab_registry, cookiejar_and_cache, mode_manager,
session_manager_stub, greasemonkey_manager, fake_args):
session_manager_stub, greasemonkey_manager, fake_args,
host_blocker_stub):
webkittab = pytest.importorskip('qutebrowser.browser.webkit.webkittab')
tab = webkittab.WebKitTab(win_id=0, mode_manager=mode_manager,
private=False)

View File

@ -475,6 +475,9 @@ class HostBlockerStub:
def __init__(self):
self.blocked_hosts = set()
def is_blocked(self, url):
return url in self.blocked_hosts
class SessionManagerStub: