tests: Fix FakeWebTabScroller

Pass tab correctly
This commit is contained in:
Florian Bruhin 2016-07-13 13:44:10 +02:00
parent f5359b67a2
commit 68f5ed4fa4
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)