tests: Fix FakeWebTabScroller
Pass tab correctly
This commit is contained in:
parent
f5359b67a2
commit
68f5ed4fa4
@ -229,8 +229,8 @@ class FakeWebTabScroller(browsertab.AbstractScroller):
|
||||
|
||||
"""Fake AbstractScroller to use in tests."""
|
||||
|
||||
def __init__(self, pos_perc):
|
||||
super().__init__()
|
||||
def __init__(self, tab, pos_perc):
|
||||
super().__init__(tab)
|
||||
self._pos_perc = pos_perc
|
||||
|
||||
def pos_perc(self):
|
||||
@ -250,7 +250,7 @@ class FakeWebTab(browsertab.AbstractTab):
|
||||
self._title = title
|
||||
self._url = url
|
||||
self._progress = progress
|
||||
self.scroll = FakeWebTabScroller(scroll_pos_perc)
|
||||
self.scroll = FakeWebTabScroller(self, scroll_pos_perc)
|
||||
|
||||
def url(self):
|
||||
return self._url
|
||||
|
@ -71,7 +71,7 @@ def test_tab(qtbot, view, config_stub, tab_registry):
|
||||
mode_manager = modeman.ModeManager(0)
|
||||
|
||||
tab_w.history = browsertab.AbstractHistory(tab_w)
|
||||
tab_w.scroll = browsertab.AbstractScroller(parent=tab_w)
|
||||
tab_w.scroll = browsertab.AbstractScroller(tab_w, parent=tab_w)
|
||||
tab_w.caret = browsertab.AbstractCaret(win_id=tab_w.win_id,
|
||||
mode_manager=mode_manager,
|
||||
tab=tab_w, parent=tab_w)
|
||||
|
Loading…
Reference in New Issue
Block a user