summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp6
-rw-r--r--tests/auto/quick/qmltests/data/TestWebEngineView.qml17
-rw-r--r--tests/auto/quick/qmltests/data/script-with-metadata.js4
-rw-r--r--tests/auto/quick/qmltests/data/tst_favicon.qml4
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadFail.qml4
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadUrl.qml6
-rw-r--r--tests/auto/quick/qmltests/data/tst_userScripts.qml12
-rw-r--r--tests/auto/quick/qmltests/data/tst_viewSource.qml6
-rw-r--r--tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp10
-rw-r--r--tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp8
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp52
-rw-r--r--tests/auto/widgets/qwebengineschemes/tst_qwebengineschemes.cpp11
12 files changed, 81 insertions, 59 deletions
diff --git a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp
index 926c3e042..50a3e6ff6 100644
--- a/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp
+++ b/tests/auto/core/qwebengineurlrequestinterceptor/tst_qwebengineurlrequestinterceptor.cpp
@@ -88,6 +88,9 @@ public:
void interceptRequest(QWebEngineUrlRequestInfo &info) override
{
+ // Since 63 we also intercept some unrelated blob requests..
+ if (info.requestUrl().scheme() == QLatin1String("blob"))
+ return;
info.block(info.requestMethod() != QByteArrayLiteral("GET"));
if (shouldIntercept && info.requestUrl().toString().endsWith(QLatin1String("__placeholder__")))
info.redirect(QUrl("qrc:///resources/content.html"));
@@ -152,6 +155,9 @@ public:
void interceptRequest(QWebEngineUrlRequestInfo &info) override
{
+ // Since 63 we also intercept the original data requests
+ if (info.requestUrl().scheme() == QLatin1String("data"))
+ return;
if (info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeFavicon)
return;
diff --git a/tests/auto/quick/qmltests/data/TestWebEngineView.qml b/tests/auto/quick/qmltests/data/TestWebEngineView.qml
index cadad4e27..f5e83c5d2 100644
--- a/tests/auto/quick/qmltests/data/TestWebEngineView.qml
+++ b/tests/auto/quick/qmltests/data/TestWebEngineView.qml
@@ -35,26 +35,27 @@ WebEngineView {
property bool windowCloseRequestedSignalEmitted: false
settings.focusOnNavigationEnabled: true
- function waitForLoadSucceeded() {
- var success = _waitFor(function() { return loadStatus == WebEngineView.LoadSucceededStatus })
+ function waitForLoadSucceeded(timeout) {
+ var success = _waitFor(function() { return loadStatus == WebEngineView.LoadSucceededStatus }, timeout)
loadStatus = null
return success
}
- function waitForLoadFailed() {
- var failure = _waitFor(function() { return loadStatus == WebEngineView.LoadFailedStatus })
+ function waitForLoadFailed(timeout) {
+ var failure = _waitFor(function() { return loadStatus == WebEngineView.LoadFailedStatus }, timeout)
loadStatus = null
return failure
}
- function waitForLoadStopped() {
- var stop = _waitFor(function() { return loadStatus == WebEngineView.LoadStoppedStatus })
+ function waitForLoadStopped(timeout) {
+ var stop = _waitFor(function() { return loadStatus == WebEngineView.LoadStoppedStatus }, timeout)
loadStatus = null
return stop
}
function waitForWindowCloseRequested() {
return _waitFor(function() { return windowCloseRequestedSignalEmitted; });
}
- function _waitFor(predicate) {
- var timeout = 12000
+ function _waitFor(predicate, timeout) {
+ if (timeout === undefined)
+ timeout = 12000;
var i = 0
while (i < timeout && !predicate()) {
testResult.wait(50)
diff --git a/tests/auto/quick/qmltests/data/script-with-metadata.js b/tests/auto/quick/qmltests/data/script-with-metadata.js
index 4dcf50f55..de2e3974c 100644
--- a/tests/auto/quick/qmltests/data/script-with-metadata.js
+++ b/tests/auto/quick/qmltests/data/script-with-metadata.js
@@ -2,8 +2,10 @@
// @name Test script
// @homepageURL http://www.qt.io/
// @description Test script with metadata block
-// @include *test*.html
+// @include *data/test*.html
+// @include /favicon.html?$/
// @exclude *test2.html
+// @exclude /test[-]iframe/
// @run-at document-end
// ==/UserScript==
diff --git a/tests/auto/quick/qmltests/data/tst_favicon.qml b/tests/auto/quick/qmltests/data/tst_favicon.qml
index 1159f3194..6f8adeb67 100644
--- a/tests/auto/quick/qmltests/data/tst_favicon.qml
+++ b/tests/auto/quick/qmltests/data/tst_favicon.qml
@@ -179,7 +179,7 @@ TestWebEngineView {
compare(iconChangedSpy.count, 0)
- var url = Qt.resolvedUrl("invalid://url")
+ var url = Qt.resolvedUrl("http://url.invalid")
webEngineView.url = url
verify(webEngineView.waitForLoadFailed())
verify(webEngineView.testSupport.waitForErrorPageLoadSucceeded())
@@ -195,7 +195,7 @@ TestWebEngineView {
compare(iconChangedSpy.count, 0)
- var url = Qt.resolvedUrl("invalid://url")
+ var url = Qt.resolvedUrl("http://url.invalid")
webEngineView.url = url
verify(webEngineView.waitForLoadFailed())
diff --git a/tests/auto/quick/qmltests/data/tst_loadFail.qml b/tests/auto/quick/qmltests/data/tst_loadFail.qml
index 47f4a2862..7b51009a1 100644
--- a/tests/auto/quick/qmltests/data/tst_loadFail.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadFail.qml
@@ -128,14 +128,14 @@ TestWebEngineView {
loadRequest = loadRequestArray[2]
compare(loadRequest.status, WebEngineView.LoadStartedStatus)
compare(loadRequest.errorDomain, WebEngineView.NoErrorDomain)
- compare(loadRequest.url, "data:text/html,chromewebdata")
+ compare(loadRequest.url, "chrome-error://chromewebdata/")
verify(loadRequest.isErrorPage)
// Loading of the error page must be successful
loadRequest = loadRequestArray[3]
compare(loadRequest.status, WebEngineView.LoadSucceededStatus)
compare(loadRequest.errorDomain, WebEngineView.NoErrorDomain)
- compare(loadRequest.url, "data:text/html,chromewebdata")
+ compare(loadRequest.url, "chrome-error://chromewebdata/")
verify(loadRequest.isErrorPage)
compare(webEngineView.url, unavailableUrl)
diff --git a/tests/auto/quick/qmltests/data/tst_loadUrl.qml b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
index 80d7a18b3..37ba4da43 100644
--- a/tests/auto/quick/qmltests/data/tst_loadUrl.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadUrl.qml
@@ -209,7 +209,7 @@ TestWebEngineView {
var bogusSite = "http://www.somesitethatdoesnotexist.abc/";
var handleLoadFailed = function(loadRequest) {
- if (loadRequest.status == WebEngineView.LoadFailedStatus) {
+ if (loadRequest.status === WebEngineView.LoadFailedStatus) {
// loadHtml constructs data URL
webEngineView.loadHtml("load failed", bogusSite);
compare(loadRequest.url, bogusSite);
@@ -231,7 +231,7 @@ TestWebEngineView {
loadRequest = loadRequestArray[2];
compare(loadRequest.status, WebEngineView.LoadStartedStatus);
compare(loadRequest.activeUrl, aboutBlank);
- compare(loadRequest.url, bogusSite)
+ compare(loadRequest.url, "data:text/html;charset=UTF-8,load failed")
loadRequest = loadRequestArray[3];
compare(loadRequest.status, WebEngineView.LoadSucceededStatus);
compare(loadRequest.activeUrl, bogusSite);
@@ -262,7 +262,7 @@ TestWebEngineView {
var loadRequest = null;
var handleLoadStarted = function(loadRequest) {
- if (loadRequest.status == WebEngineView.LoadStartedStatus)
+ if (loadRequest.status === WebEngineView.LoadStartedStatus)
webEngineView.stop();
}
webEngineView.loadingChanged.connect(handleLoadStarted);
diff --git a/tests/auto/quick/qmltests/data/tst_userScripts.qml b/tests/auto/quick/qmltests/data/tst_userScripts.qml
index e9a4eba99..d7c7d5983 100644
--- a/tests/auto/quick/qmltests/data/tst_userScripts.qml
+++ b/tests/auto/quick/qmltests/data/tst_userScripts.qml
@@ -170,7 +170,7 @@ Item {
webEngineView.userScripts = [ scriptWithMetadata ];
- // @include *test*.html
+ // @include *data/test*.html
webEngineView.url = Qt.resolvedUrl("test1.html");
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView, "title", "New title");
@@ -179,6 +179,16 @@ Item {
webEngineView.url = Qt.resolvedUrl("test2.html");
webEngineView.waitForLoadSucceeded();
tryCompare(webEngineView, "title", "Test page with huge link area");
+
+ // @include /favicon.html?$/
+ webEngineView.url = Qt.resolvedUrl("favicon.html");
+ webEngineView.waitForLoadSucceeded();
+ tryCompare(webEngineView, "title", "New title");
+
+ // @exclude /test[-]iframe/
+ webEngineView.url = Qt.resolvedUrl("test-iframe.html");
+ webEngineView.waitForLoadSucceeded();
+ tryCompare(webEngineView, "title", "Test page with huge link area and iframe");
}
function test_profileWideScript() {
diff --git a/tests/auto/quick/qmltests/data/tst_viewSource.qml b/tests/auto/quick/qmltests/data/tst_viewSource.qml
index 576035ef2..a9cf11f34 100644
--- a/tests/auto/quick/qmltests/data/tst_viewSource.qml
+++ b/tests/auto/quick/qmltests/data/tst_viewSource.qml
@@ -64,7 +64,7 @@ TestWebEngineView {
function init() {
webEngineView.url = Qt.resolvedUrl("test1.html");
- verify(webEngineView.waitForLoadSucceeded());
+ verify(webEngineView.waitForLoadSucceeded(20000));
newViewRequestedSpy.clear();
titleChangedSpy.clear();
@@ -113,9 +113,9 @@ TestWebEngineView {
webEngineView.url = row.userInputUrl;
if (row.loadSucceed) {
- verify(webEngineView.waitForLoadSucceeded());
+ verify(webEngineView.waitForLoadSucceeded(15000));
} else {
- verify(webEngineView.waitForLoadFailed());
+ verify(webEngineView.waitForLoadFailed(15000));
}
tryVerify(function() { return titleChangedSpy.count == 1; });
diff --git a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
index 3ce697faf..992254206 100644
--- a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
+++ b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
@@ -622,6 +622,8 @@ void tst_QWebEngineDownloads::downloadViaSetUrl()
auto indexFavRR = waitForFaviconRequest(&server);
QVERIFY(indexFavRR);
+ indexRR.reset();
+ indexFavRR.reset();
QTRY_COMPARE(loadSpy.count(), 1);
QTRY_COMPARE(urlSpy.count(), 1);
@@ -642,16 +644,20 @@ void tst_QWebEngineDownloads::downloadViaSetUrl()
auto fileRR = waitForRequest(&server);
QVERIFY(fileRR);
+ QCOMPARE(fileRR->requestMethod(), QByteArrayLiteral("GET"));
+ QCOMPARE(fileRR->requestPath(), QByteArrayLiteral("/file"));
fileRR->setResponseHeader(QByteArrayLiteral("content-disposition"), QByteArrayLiteral("attachment"));
fileRR->setResponseBody(QByteArrayLiteral("redacted"));
fileRR->sendResponse();
- auto fileFavRR = waitForFaviconRequest(&server);
- QVERIFY(fileFavRR);
+// Since 63 we no longer get favicon requests here:
+// auto fileFavRR = waitForFaviconRequest(&server);
+// QVERIFY(fileFavRR);
QTRY_COMPARE(loadSpy.count(), 1);
QTRY_COMPARE(urlSpy.count(), 2);
QTRY_COMPARE(downloadUrls.count(), 1);
+ fileRR.reset();
QCOMPARE(loadSpy.takeFirst().value(0).toBool(), false);
QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), fileUrl);
QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), indexUrl);
diff --git a/tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp b/tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp
index 6ae4c41e6..da041ee59 100644
--- a/tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp
+++ b/tests/auto/widgets/qwebenginefaviconmanager/tst_qwebenginefaviconmanager.cpp
@@ -236,10 +236,10 @@ void tst_QWebEngineFaviconManager::errorPageEnabled()
QSignalSpy iconUrlChangedSpy(m_page, SIGNAL(iconUrlChanged(QUrl)));
QSignalSpy iconChangedSpy(m_page, SIGNAL(iconChanged(QIcon)));
- QUrl url("invalid://url");
+ QUrl url("http://url.invalid");
m_page->load(url);
- QTRY_COMPARE(loadFinishedSpy.count(), 2);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 14000);
QCOMPARE(iconUrlChangedSpy.count(), 0);
QCOMPARE(iconChangedSpy.count(), 0);
@@ -255,10 +255,10 @@ void tst_QWebEngineFaviconManager::errorPageDisabled()
QSignalSpy iconUrlChangedSpy(m_page, SIGNAL(iconUrlChanged(QUrl)));
QSignalSpy iconChangedSpy(m_page, SIGNAL(iconChanged(QIcon)));
- QUrl url("invalid://url");
+ QUrl url("http://url.invalid");
m_page->load(url);
- QTRY_COMPARE(loadFinishedSpy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 12000);
QCOMPARE(iconUrlChangedSpy.count(), 0);
QCOMPARE(iconChangedSpy.count(), 0);
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 7d6921368..23c66058e 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -294,43 +294,41 @@ void tst_QWebEnginePage::cleanupTestCase()
class NavigationRequestOverride : public QWebEnginePage
{
public:
- NavigationRequestOverride(QWebEngineView* parent, bool initialValue) : QWebEnginePage(parent), m_acceptNavigationRequest(initialValue) {}
+ NavigationRequestOverride(QWebEngineProfile* profile, bool initialValue) : QWebEnginePage(profile, nullptr), m_acceptNavigationRequest(initialValue) {}
bool m_acceptNavigationRequest;
protected:
virtual bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame)
{
Q_UNUSED(url);
- Q_UNUSED(type);
Q_UNUSED(isMainFrame);
-
- return m_acceptNavigationRequest;
+ if (type == QWebEnginePage::NavigationTypeFormSubmitted)
+ return m_acceptNavigationRequest;
+ return true;
}
};
void tst_QWebEnginePage::acceptNavigationRequest()
{
- QWebEngineView view;
- QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool)));
+ QWebEngineProfile profile;
+ NavigationRequestOverride page(&profile, false);
- NavigationRequestOverride* newPage = new NavigationRequestOverride(&view, false);
- view.setPage(newPage);
+ QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
- // acceptNavigationRequest and QWebEngineUrlRequestInterceptor::interceptRequest are not called
- // for data: urls, which means the test is broken, aka setting
- // newPage->m_acceptNavigationRequest to false does nothing to stop the page from loading.
- // See QTBUG-50922 comments.
- view.setHtml(QString("<html><body><form name='tstform' action='data:text/html,foo'method='get'>"
+ 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);
- evaluateJavaScriptSync(view.page(), "tstform.submit();");
-
- newPage->m_acceptNavigationRequest = true;
- evaluateJavaScriptSync(view.page(), "tstform.submit();");
+ evaluateJavaScriptSync(&page, "tstform.submit();");
QTRY_COMPARE(loadSpy.count(), 2);
- QCOMPARE(toPlainTextSync(view.page()), QString("foo?"));
+ // Content hasn't changed so the form submit will still work
+ page.m_acceptNavigationRequest = true;
+ evaluateJavaScriptSync(&page, "tstform.submit();");
+ QTRY_COMPARE(loadSpy.count(), 3);
+
+ // Now the content has changed
+ QCOMPARE(toPlainTextSync(&page), QString("foo?"));
}
class JSTestPage : public QWebEnginePage
@@ -1936,7 +1934,7 @@ void tst_QWebEnginePage::userAgentNewlineStripping()
// The user agent will be updated after a page load.
page.load(QUrl("about:blank"));
- QCOMPARE(evaluateJavaScriptSync(&page, "navigator.userAgent").toString(), QStringLiteral("My User Agent X-New-Http-Header: Oh Noes!"));
+ QTRY_COMPARE(evaluateJavaScriptSync(&page, "navigator.userAgent").toString(), QStringLiteral("My User Agent X-New-Http-Header: Oh Noes!"));
}
void tst_QWebEnginePage::crashTests_LazyInitializationOfMainFrame()
@@ -3405,7 +3403,7 @@ void tst_QWebEnginePage::setHtmlWithImageResource()
QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
page.setHtml(html, QUrl("file:///path/to/file"));
- QTRY_COMPARE(spy.count(), 1);
+ QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 1, 12000);
QCOMPARE(evaluateJavaScriptSync(&page, "document.images.length").toInt(), 1);
QCOMPARE(evaluateJavaScriptSync(&page, "document.images[0].width").toInt(), 128);
@@ -4044,7 +4042,6 @@ void tst_QWebEnginePage::setUrlHistory()
void tst_QWebEnginePage::setUrlUsingStateObject()
{
- const QUrl aboutBlank("about:blank");
QUrl url;
QSignalSpy urlChangedSpy(m_page, SIGNAL(urlChanged(QUrl)));
int expectedUrlChangeCount = 0;
@@ -4053,12 +4050,10 @@ void tst_QWebEnginePage::setUrlUsingStateObject()
url = QUrl("qrc:/resources/test1.html");
m_page->setUrl(url);
- QSignalSpy spyFinished(m_page, &QWebEnginePage::loadFinished);
- QVERIFY(spyFinished.wait());
expectedUrlChangeCount++;
- QCOMPARE(urlChangedSpy.count(), expectedUrlChangeCount);
+ QTRY_COMPARE(urlChangedSpy.count(), expectedUrlChangeCount);
QCOMPARE(m_page->url(), url);
- QCOMPARE(m_page->history()->count(), 1);
+ QTRY_COMPARE(m_page->history()->count(), 1);
evaluateJavaScriptSync(m_page, "window.history.pushState(null, 'push', 'navigate/to/here')");
expectedUrlChangeCount++;
@@ -4076,9 +4071,8 @@ void tst_QWebEnginePage::setUrlUsingStateObject()
QVERIFY(m_page->history()->canGoBack());
evaluateJavaScriptSync(m_page, "window.history.back()");
- QTest::qWait(100);
expectedUrlChangeCount++;
- QCOMPARE(urlChangedSpy.count(), expectedUrlChangeCount);
+ QTRY_COMPARE(urlChangedSpy.count(), expectedUrlChangeCount);
QCOMPARE(m_page->url(), QUrl("qrc:/resources/test1.html"));
QVERIFY(m_page->history()->canGoForward());
QVERIFY(!m_page->history()->canGoBack());
@@ -4339,8 +4333,8 @@ void tst_QWebEnginePage::toPlainTextLoadFinishedRace()
QTRY_VERIFY(spy.count() == 1);
QCOMPARE(toPlainTextSync(page.data()), QString("foobarbaz"));
- page->load(QUrl("fail:unknown/scheme"));
- QTRY_VERIFY(spy.count() == 2);
+ page->load(QUrl("http://fail.invalid/"));
+ QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 2, 12000);
QString s = toPlainTextSync(page.data());
QVERIFY(s.contains("foobarbaz") == !enableErrorPage);
diff --git a/tests/auto/widgets/qwebengineschemes/tst_qwebengineschemes.cpp b/tests/auto/widgets/qwebengineschemes/tst_qwebengineschemes.cpp
index cacfc1a3c..9381b3930 100644
--- a/tests/auto/widgets/qwebengineschemes/tst_qwebengineschemes.cpp
+++ b/tests/auto/widgets/qwebengineschemes/tst_qwebengineschemes.cpp
@@ -49,8 +49,10 @@ public:
{
}
int acceptNavigationRequestCalls = 0;
- bool acceptNavigationRequest(const QUrl &/*url*/, NavigationType /*type*/, bool /*isMainFrame*/) override
+ bool acceptNavigationRequest(const QUrl &/*url*/, NavigationType type, bool /*isMainFrame*/) override
{
+ if (type == QWebEnginePage::NavigationTypeTyped)
+ return true;
this->acceptNavigationRequestCalls++;
return false;
}
@@ -60,13 +62,14 @@ void tst_QWebEngineSchemes::unknownUrlSchemePolicy()
{
QWebEngineView view;
AcceptNavigationRequestHandler page;
+ QSignalSpy loadFinishedSpy(&page, &QWebEnginePage::loadFinished);
view.setPage(&page);
view.resize(400, 40);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
QWebEngineSettings *settings = view.page()->profile()->settings();
+ settings->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
settings->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, true);
- QSignalSpy loadFinishedSpy(&view, &QWebEngineView::loadFinished);
QWebEngineSettings::UnknownUrlSchemePolicy policies[6] = {QWebEngineSettings::DisallowUnknownUrlSchemes,
QWebEngineSettings::DisallowUnknownUrlSchemes,
@@ -91,7 +94,7 @@ void tst_QWebEngineSchemes::unknownUrlSchemePolicy()
} else { // navigation request coming from user interaction
shouldAccept = (2 <= i); // all cases except DisallowUnknownUrlSchemes
view.setHtml("<html><body><a id='nonexlink' href='nonexistentscheme://somewhere'>nonexistentscheme://somewhere</a></body></html>");
- QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.size(), 1, 30000);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.size(), 1, 15000);
// focus and trigger the link
view.page()->runJavaScript("document.getElementById('nonexlink').focus();", [&view](const QVariant &result) {
Q_UNUSED(result);
@@ -101,7 +104,7 @@ void tst_QWebEngineSchemes::unknownUrlSchemePolicy()
}
bool errorPageEnabled = settings->testAttribute(QWebEngineSettings::ErrorPageEnabled);
- QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.size(), 2 + (errorPageEnabled ? 1 : 0), 30000);
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.size(), 2 + (errorPageEnabled ? 1 : 0), 15000);
QCOMPARE(page.acceptNavigationRequestCalls, shouldAccept ? 1 : 0);
}
}