summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-05 14:51:34 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-06 12:52:53 +0100
commit296469f8ecef1f4d10cf8c24237fe9397b41f306 (patch)
treee8dd6d5c0c6fceeb80c3faa2e182515cb87353fc
parent58bc92115febfa332e9f2ebe0f06a01b5a679416 (diff)
More speculative fixes for MSVC 2019 CIv5.14.0-beta3
Expand many more timeouts as loading basic test cases can now take many seconds. Task-number: QTBUG-79290 Change-Id: I749fe50525919b24a4a3fcba905745b6d6648121 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
-rw-r--r--tests/auto/quick/inspectorserver/BLACKLIST1
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp42
-rw-r--r--tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp2
-rw-r--r--tests/auto/widgets/schemes/tst_schemes.cpp2
4 files changed, 24 insertions, 23 deletions
diff --git a/tests/auto/quick/inspectorserver/BLACKLIST b/tests/auto/quick/inspectorserver/BLACKLIST
index f80823bf..92c76505 100644
--- a/tests/auto/quick/inspectorserver/BLACKLIST
+++ b/tests/auto/quick/inspectorserver/BLACKLIST
@@ -3,3 +3,4 @@ osx
[openRemoteDebuggingSession]
osx
+msvc-2019
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 931dbf7f..0a65d4c0 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -322,7 +322,7 @@ void tst_QWebEnginePage::acceptNavigationRequest()
page.setHtml(QString("<html><body><form name='tstform' action='data:text/html,foo'method='get'>"
"<input type='text'><input type='submit'></form></body></html>"), QUrl());
- QTRY_COMPARE(loadSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 1, 20000);
evaluateJavaScriptSync(&page, "tstform.submit();");
QTRY_COMPARE(loadSpy.count(), 2);
@@ -388,7 +388,7 @@ void tst_QWebEnginePage::geolocationRequestJS()
QSignalSpy spyLoadFinished(newPage, SIGNAL(loadFinished(bool)));
newPage->setHtml(QString("<html><body>test</body></html>"), QUrl("qrc://secure/origin"));
- QTRY_COMPARE(spyLoadFinished.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(spyLoadFinished.count(), 1, 20000);
// Geolocation is only enabled for visible WebContents.
view.show();
@@ -415,7 +415,7 @@ void tst_QWebEnginePage::loadFinished()
page.load(QUrl("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html,"
"<head><meta http-equiv='refresh' content='1'></head>foo \">"
"<frame src=\"data:text/html,bar\"></frameset>"));
- QTRY_COMPARE(spyLoadFinished.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(spyLoadFinished.count(), 1, 20000);
QEXPECT_FAIL("", "Behavior change: Load signals are emitted only for the main frame in QtWebEngine.", Continue);
QTRY_VERIFY_WITH_TIMEOUT(spyLoadStarted.count() > 1, 100);
@@ -475,9 +475,9 @@ void tst_QWebEnginePage::pasteImage()
QClipboard *clipboard = QGuiApplication::clipboard();
clipboard->setImage(origImage);
QWebEnginePage *page = m_view->page();
- page->load(QUrl("qrc:///resources/pasteimage.html"));
QSignalSpy spyFinished(m_view, &QWebEngineView::loadFinished);
- QVERIFY(spyFinished.wait());
+ page->load(QUrl("qrc:///resources/pasteimage.html"));
+ QTRY_VERIFY_WITH_TIMEOUT(!spyFinished.isEmpty(), 20000);
page->triggerAction(QWebEnginePage::Paste);
QTRY_VERIFY(evaluateJavaScriptSync(page,
"window.myImageDataURL ? window.myImageDataURL.length : 0").toInt() > 0);
@@ -568,11 +568,11 @@ void tst_QWebEnginePage::acceptNavigationRequestNavigationType()
QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
page.load(QUrl("qrc:///resources/script.html"));
- QTRY_COMPARE(loadSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 1, 20000);
QTRY_COMPARE(page.navigations.count(), 1);
page.load(QUrl("qrc:///resources/content.html"));
- QTRY_COMPARE(loadSpy.count(), 2);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 2, 20000);
QTRY_COMPARE(page.navigations.count(), 2);
page.triggerAction(QWebEnginePage::Stop);
@@ -587,7 +587,7 @@ void tst_QWebEnginePage::acceptNavigationRequestNavigationType()
QTRY_COMPARE(page.navigations.count(), 4);
page.load(QUrl("qrc:///resources/reload.html"));
- QTRY_COMPARE(loadSpy.count(), 6);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 6, 20000);
QTRY_COMPARE(page.navigations.count(), 6);
QList<QWebEnginePage::NavigationType> expectedList;
@@ -613,7 +613,7 @@ void tst_QWebEnginePage::popupFormSubmission()
page.setHtml("<form name='form1' method=get action='' target='myNewWin'>"
" <input type='hidden' name='foo' value='bar'>"
"</form>");
- QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 20000);
page.runJavaScript("window.open('', 'myNewWin', 'width=500,height=300,toolbar=0');");
evaluateJavaScriptSync(&page, "document.form1.submit();");
@@ -666,8 +666,8 @@ void tst_QWebEnginePage::multipleProfilesAndLocalStorage()
page1.setHtml(QString("<html><body> </body></html>"), QUrl("http://wwww.example.com"));
page2.setHtml(QString("<html><body> </body></html>"), QUrl("http://wwww.example.com"));
- QTRY_COMPARE(loadSpy1.count(), 1);
- QTRY_COMPARE(loadSpy2.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy1.count(), 1, 20000);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy2.count(), 1, 20000);
evaluateJavaScriptSync(&page1, "localStorage.setItem('test', 'value1');");
evaluateJavaScriptSync(&page2, "localStorage.setItem('test', 'value2');");
@@ -727,7 +727,7 @@ void tst_QWebEnginePage::textSelection()
page->setView(&view);
QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool)));
page->setHtml(content);
- QTRY_COMPARE(loadSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 1, 20000);
// these actions must exist
QVERIFY(page->action(QWebEnginePage::SelectAll) != 0);
@@ -759,7 +759,7 @@ void tst_QWebEnginePage::backActionUpdate()
QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool)));
QUrl url = QUrl("qrc:///resources/framedindex.html");
page->load(url);
- QTRY_COMPARE(loadSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 1, 20000);
QVERIFY(!action->isEnabled());
QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(10, 10));
QEXPECT_FAIL("", "Behavior change: Load signals are emitted only for the main frame in QtWebEngine.", Continue);
@@ -782,8 +782,8 @@ void tst_QWebEnginePage::localStorageVisibility()
QSignalSpy loadSpy2(&webPage2, &QWebEnginePage::loadFinished);
webPage1.setHtml(QString("<html><body>test</body></html>"), QUrl("http://www.example.com/"));
webPage2.setHtml(QString("<html><body>test</body></html>"), QUrl("http://www.example.com/"));
- QTRY_COMPARE(loadSpy1.count(), 1);
- QTRY_COMPARE(loadSpy2.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy1.count(), 1, 20000);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy2.count(), 1, 20000);
// The attribute determines the visibility of the window.localStorage object.
QVERIFY(evaluateJavaScriptSync(&webPage1, QString("(window.localStorage != undefined)")).toBool());
@@ -900,7 +900,7 @@ void tst_QWebEnginePage::testJSPrompt()
bool res;
QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
page.setHtml(QStringLiteral("<html><body></body></html>"));
- QTRY_COMPARE(loadSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 1, 20000);
// OK + QString()
res = evaluateJavaScriptSync(&page,
@@ -1037,7 +1037,7 @@ void tst_QWebEnginePage::findTextSuccessiveShouldCallAllCallbacks()
CallbackSpy<bool> spy5;
QSignalSpy loadSpy(m_view, SIGNAL(loadFinished(bool)));
m_view->setHtml(QString("<html><head></head><body><div>abcdefg abcdefg abcdefg abcdefg abcdefg</div></body></html>"));
- QTRY_COMPARE(loadSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 1, 20000);
m_page->findText("abcde", 0, spy1.ref());
m_page->findText("abcd", 0, spy2.ref());
m_page->findText("abc", 0, spy3.ref());
@@ -1339,7 +1339,7 @@ void tst_QWebEnginePage::loadSignalsOrder()
QSignalSpy spyLoadSpy(&loadSpy, &SpyForLoadSignalsOrder::started);
QVERIFY(spyLoadSpy.wait(500));
page.load(url);
- QTRY_VERIFY(loadSpy.isFinished());
+ QTRY_VERIFY_WITH_TIMEOUT(loadSpy.isFinished(), 20000);
}
void tst_QWebEnginePage::renderWidgetHostViewNotShowTopLevel()
@@ -1486,7 +1486,7 @@ void tst_QWebEnginePage::getUserMediaRequest()
QVERIFY(QTest::qWaitForWindowExposed(&view));
}
- QTRY_VERIFY_WITH_TIMEOUT(page.loadSucceeded(), 20000);
+ QTRY_VERIFY_WITH_TIMEOUT(page.loadSucceeded(), 60000);
page.settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, true);
// 1. Rejecting request on C++ side should reject promise on JS side.
@@ -1827,7 +1827,7 @@ void tst_QWebEnginePage::runJavaScriptDisabled()
// Settings changes take effect asynchronously. The load and wait ensure
// that the settings are applied by the time we start to execute JavaScript.
page.load(QStringLiteral("about:blank"));
- QTRY_COMPARE(spy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 1, 20000);
QCOMPARE(evaluateJavaScriptSyncInWorld(&page, QStringLiteral("1+1"), QWebEngineScript::MainWorld),
QVariant());
QCOMPARE(evaluateJavaScriptSyncInWorld(&page, QStringLiteral("1+1"), QWebEngineScript::ApplicationWorld),
@@ -1953,7 +1953,7 @@ void tst_QWebEnginePage::symmetricUrl()
// loading is _not_ immediate, so the text isn't set just yet.
QVERIFY(toPlainTextSync(view.page()).isEmpty());
- QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 20000);
QCOMPARE(view.history()->count(), 1);
QCOMPARE(toPlainTextSync(view.page()), QString("Test"));
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
index 31438996..044fac9d 100644
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
@@ -3125,7 +3125,7 @@ void tst_QWebEngineView::webUIURLs()
view.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
QSignalSpy loadFinishedSpy(&view, SIGNAL(loadFinished(bool)));
view.load(url);
- QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 12000);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 30000);
QCOMPARE(loadFinishedSpy.takeFirst().at(0).toBool(), supported);
}
diff --git a/tests/auto/widgets/schemes/tst_schemes.cpp b/tests/auto/widgets/schemes/tst_schemes.cpp
index 6da34efd..1b609357 100644
--- a/tests/auto/widgets/schemes/tst_schemes.cpp
+++ b/tests/auto/widgets/schemes/tst_schemes.cpp
@@ -103,7 +103,7 @@ void tst_Schemes::unknownUrlSchemePolicy()
});
}
- QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.size(), 2, 15000);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.size(), 2, 60000);
QCOMPARE(page.acceptNavigationRequestCalls, shouldAccept ? 1 : 0);
}
}