diff options
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp')
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp index 0ad460634..99182f155 100644 --- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp +++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp @@ -146,6 +146,13 @@ void tst_QWebEngineProfile::urlSchemeHandlers() view.load(url); QVERIFY(loadFinishedSpy.wait()); QVERIFY(toPlainTextSync(view.page()) != url.toString()); + + // Install a handler that is owned by the view. Make sure this doesn't crash on shutdown. + profile.installUrlSchemeHandler("aviancarrier", new ReplyingUrlSchemeHandler(&view)); + url = QUrl(QStringLiteral("aviancarrier:inspector.mortensen@politistyrke.dk")); + view.load(url); + QVERIFY(loadFinishedSpy.wait()); + QCOMPARE(toPlainTextSync(view.page()), url.toString()); } class FailingUrlSchemeHandler : public QWebEngineUrlSchemeHandler |