Fix most end2end tests with Qt 5.10

For some reason, if we don't wait for about:blank to be fully loaded with
Qt 5.10, we get the next LoadStatus.finished notification with about:blank as
URL.

This is most likely caused by the changes in
https://codereview.qt-project.org/#/c/202924/

See #3003
This commit is contained in:
Florian Bruhin 2017-12-05 07:05:07 +01:00
parent a8f4444c24
commit 62228752aa

View File

@ -36,7 +36,7 @@ import pytest
from PyQt5.QtCore import pyqtSignal, QUrl, qVersion
from qutebrowser.misc import ipc
from qutebrowser.utils import log, utils, javascript
from qutebrowser.utils import log, utils, javascript, qtutils
from helpers import utils as testutils
from end2end.fixtures import testprocess
@ -687,9 +687,12 @@ class QuteProc(testprocess.Process):
raise ValueError("Invalid URL {}: {}".format(url,
qurl.errorString()))
if qurl == QUrl('about:blank'):
if (qurl == QUrl('about:blank') and
not qtutils.version_check('5.10', compiled=False)):
# For some reason, we don't get a LoadStatus.success for
# about:blank sometimes.
# However, if we do this for Qt 5.10, we get general testsuite
# instability as site loads get reported with about:blank...
pattern = "Changing title for idx * to 'about:blank'"
else:
# We really need the same representation that the webview uses in