Commit 1a0e71b1 authored by Michael Brüning's avatar Michael Brüning Committed by Allan Sandfeld Jensen
Browse files

Fix flaky tst_QQuickWebEngineView::printToPdf test by using QTRY_VERIFY


Task-number: QTBUG-55857
Change-Id: Ieb7fe836e7b03bea28dd97bcad343708a5be2cb5
Reviewed-by: default avatarAlexandru Croitor <alexandru.croitor@qt.io>
Showing with 2 additions and 4 deletions
......@@ -505,8 +505,7 @@ void tst_QQuickWebEngineView::printToPdf()
QString path = tempDir.path() + "/print_success.pdf";
view->printToPdf(path, QQuickWebEngineView::A4, QQuickWebEngineView::Portrait);
QTest::qWait(500);
QVERIFY(QFile::exists(path));
QTRY_VERIFY(QFile::exists(path));
#if !defined(Q_OS_WIN)
path = tempDir.path() + "/print_//fail.pdf";
......@@ -514,8 +513,7 @@ void tst_QQuickWebEngineView::printToPdf()
path = tempDir.path() + "/print_|fail.pdf";
#endif // #if !defined(Q_OS_WIN)
view->printToPdf(path, QQuickWebEngineView::A4, QQuickWebEngineView::Portrait);
QTest::qWait(500);
QVERIFY(!QFile::exists(path));
QTRY_VERIFY(!QFile::exists(path));
}
void tst_QQuickWebEngineView::stopSettingFocusWhenDisabled()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment