summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-15 14:49:14 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-15 13:03:27 +0000
commit5da7063b172b80f8d3cca9ce0b75756375c36b8e (patch)
tree4e90065d2960c745a83b700cb811c666c0c3b9cb /tests
parent6d6e296edc73dd143d2cb12df8f3602b97ab330e (diff)
Wait for focusWidget being set
Change-Id: Ia248991e9b623e6d19fb34b10427ebaef72b9eae Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
index 6ba6d78a4..9531d0cf4 100644
--- a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
+++ b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
@@ -328,6 +328,7 @@ void tst_QWebEngineDownloads::downloadLink()
//
// - Navigate: user left-clicks on link
// - SaveLink: user right-clicks on link and chooses "save link as" from menu
+ QTRY_VERIFY(view.focusWidget());
QWidget *renderWidget = view.focusWidget();
QPoint linkPos(10, 10);
if (userAction == SaveLink) {
@@ -445,6 +446,7 @@ void tst_QWebEngineDownloads::downloadTwoLinks()
favIconRR->setResponseStatus(404);
favIconRR->sendResponse();
+ QTRY_VERIFY(view.focusWidget());
QWidget *renderWidget = view.focusWidget();
QTest::mouseClick(renderWidget, Qt::LeftButton, {}, QPoint(10, 10));
QTest::mouseClick(renderWidget, Qt::LeftButton, {}, QPoint(10, 30));