summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2020-11-03 19:36:18 +0100
committerKirill Burtsev <kirill.burtsev@qt.io>2021-02-08 00:09:29 +0100
commit0185f4114579c818fd50374ff1e7d8c054c01e24 (patch)
tree5fcee73fcfd93c2979c2abbea5afc7ee5565a661 /tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
parenta4fce092cbd877560dd75b38a2e495aaa75f60f3 (diff)
Resolve installed interceptors right before interception point
Ammends a05bb73747. Since request processing is asynchronous, resolve interceptors right before actual interception point to accommodate cases where interceptor on profile or page was replaced or uninstalled before all instantiated InterceptedRequest's are processed. Effectively, this doesn't send url requests to uninstalled interceptors. Fixes: QTBUG-86286 Change-Id: Iaf55e5ef99d62b55f7304ee68a0c89a1469fd86f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp')
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index f4c0484eb..1b0f95064 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -514,7 +514,7 @@ void tst_QWebEngineProfile::urlSchemeHandlerStreaming()
view.setPage(new QWebEnginePage(&profile, &view));
view.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
view.load(QUrl(QStringLiteral("stream://whatever")));
- QVERIFY(loadFinishedSpy.wait());
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 30000);
QByteArray result;
result.append(1000, 'c');
QCOMPARE(toPlainTextSync(view.page()), QString::fromLatin1(result));
@@ -575,7 +575,7 @@ void tst_QWebEngineProfile::urlSchemeHandlerRequestHeaders()
QWebEnginePage page(&profile);
QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
page.load(QUrl(QStringLiteral("myscheme://whatever")));
- QVERIFY(loadFinishedSpy.wait());
+ QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 30000);
}
void tst_QWebEngineProfile::urlSchemeHandlerInstallation()
@@ -707,7 +707,7 @@ void tst_QWebEngineProfile::urlSchemeHandlerXhrStatus()
profile.installUrlSchemeHandler("aviancarrier", &handler);
page.setWebChannel(&channel);
page.load(QUrl("aviancarrier:/"));
- QTRY_VERIFY(host.isReady());
+ QTRY_VERIFY_WITH_TIMEOUT(host.isReady(), 30000);
host.load(QUrl("aviancarrier:/ok"));
host.load(QUrl("aviancarrier:/redirect"));
host.load(QUrl("aviancarrier:/fail"));