Fix scroll_anchor in javascript tests.
It seems scrollRequested doesn't actually get emitted.
This commit is contained in:
parent
d887623377
commit
e98a05e53d
@ -80,8 +80,10 @@ class JSTester:
|
||||
def scroll_anchor(self, name):
|
||||
"""Scroll the main frame to the given anchor."""
|
||||
page = self.webview.page()
|
||||
with self._qtbot.waitSignal(page.scrollRequested, raising=True):
|
||||
page.mainFrame().scrollToAnchor(name)
|
||||
old_pos = page.mainFrame().scrollPosition()
|
||||
page.mainFrame().scrollToAnchor(name)
|
||||
new_pos = page.mainFrame().scrollPosition()
|
||||
assert old_pos != new_pos
|
||||
|
||||
def load(self, path, **kwargs):
|
||||
"""Load and display the given test data.
|
||||
|
Loading…
Reference in New Issue
Block a user