Strip whitespace for position_caret tests.

It seems on Windows, QWebPage.SelectNextWord includes the trailing space. This
should fix those tests on Windows.
This commit is contained in:
Florian Bruhin 2015-05-18 23:04:11 +02:00
parent 37b431f72f
commit beb970d7d5

View File

@ -51,7 +51,7 @@ class CaretTester:
"""Check whether the caret is before the MARKER text."""
self.js.run_file('position_caret.js')
self.js.webview.triggerPageAction(QWebPage.SelectNextWord)
assert self.js.webview.selectedText() == "MARKER"
assert self.js.webview.selectedText().rstrip() == "MARKER"
def check_scrolled(self):
"""Check if the page is scrolled down."""