diff --git a/tests/helpers/stubs.py b/tests/helpers/stubs.py index 0119c612c..ba7491897 100644 --- a/tests/helpers/stubs.py +++ b/tests/helpers/stubs.py @@ -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 diff --git a/tests/unit/browser/test_tab.py b/tests/unit/browser/test_tab.py index 7f1ae3073..636cfa6e7 100644 --- a/tests/unit/browser/test_tab.py +++ b/tests/unit/browser/test_tab.py @@ -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)