From 4124c67c5f1d03fcd792a94af5c72a9b0b8d7c85 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 31 Jan 2018 19:10:59 +0100 Subject: [PATCH] Autotests: Add qWait(10) at the end of QtWebEngine tests Otherwise it crashes on exit --- autotests/tabmodeltest.cpp | 4 +++- autotests/webtabtest.cpp | 2 ++ autotests/webviewtest.cpp | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/autotests/tabmodeltest.cpp b/autotests/tabmodeltest.cpp index 92123af3e..77756eb7a 100644 --- a/autotests/tabmodeltest.cpp +++ b/autotests/tabmodeltest.cpp @@ -94,6 +94,7 @@ void TabModelTest::basicTest() ModelTest modelTest2(&model2); QCOMPARE(model2.rowCount(), 1); + QTest::qWait(10); delete w; } @@ -117,6 +118,7 @@ void TabModelTest::dataTest() WebTab *tab1 = w->weView(1)->webTab(); + QTest::qWait(10); delete w; } void TabModelTest::treeModelTest() @@ -213,7 +215,7 @@ void TabModelTest::treeModelTest() QCOMPARE(model.index(2, 0).data(TabModel::WebTabRole).value(), tab5); QCOMPARE(model.index(3, 0).data(TabModel::WebTabRole).value(), tab6); - QTest::qWait(1); + QTest::qWait(10); delete w; } diff --git a/autotests/webtabtest.cpp b/autotests/webtabtest.cpp index 632722fb4..da204393f 100644 --- a/autotests/webtabtest.cpp +++ b/autotests/webtabtest.cpp @@ -70,6 +70,8 @@ void WebTabTest::parentChildTabsTest() QCOMPARE(tab3.parentTab(), &tab1); QCOMPARE(tab3.childTabs(), QVector{&tab4}); QCOMPARE(tab4.parentTab(), &tab3); + + QTest::qWait(10); } FALKONTEST_MAIN(WebTabTest) diff --git a/autotests/webviewtest.cpp b/autotests/webviewtest.cpp index 1e9380def..18ee3d0f8 100644 --- a/autotests/webviewtest.cpp +++ b/autotests/webviewtest.cpp @@ -101,6 +101,8 @@ void WebViewTest::loadSignalsChangePageTest() QTRY_COMPARE(loadStartedSpy.count(), 1); QCOMPARE(loadFinishedSpy.count(), 0); + + QTest::qWait(10); } FALKONTEST_MAIN(WebViewTest)