summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-03-31 13:28:13 +0200
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-03-31 15:20:45 +0000
commit09733f9fd1056ab578a184598808ebc81140da31 (patch)
tree5a1864623dd1cf873590e19ebb571f13fa9db9ed /tests
parent0a4b9df53f0ede439435b0408558e1038c619a67 (diff)
Fix glitches in tst_QWebEnginePage::printToPdf
QTRY_VERIFY combined with CallbackSpy::waitForResult is one layer of retry/wait too much. If the first waitForResult fails but subsequent waitForResult calls succeed something's very wrong. The condition in the second QTRY_VERIFY was wrong. The unary not was applied to length, not to the whole comparison. Change-Id: Ic66f740ba01527a979ab1ef9d8188dcbe9ab713a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 8b93c7169..95e6f5374 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -5007,11 +5007,11 @@ void tst_QWebEnginePage::printToPdf()
CallbackSpy<QByteArray> successfulSpy;
page.printToPdf(layout, successfulSpy.ref());
- QTRY_VERIFY(successfulSpy.waitForResult().length() > 0);
+ QVERIFY(successfulSpy.waitForResult().length() > 0);
CallbackSpy<QByteArray> failedInvalidLayoutSpy;
page.printToPdf(QPageLayout(), failedInvalidLayoutSpy.ref());
- QTRY_VERIFY(!failedInvalidLayoutSpy.waitForResult().length() > 0);
+ QCOMPARE(failedInvalidLayoutSpy.waitForResult().length(), 0);
}
QTEST_MAIN(tst_QWebEnginePage)