diff options
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp')
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp index e84aacb27..2a4e2d533 100644 --- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp +++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp @@ -60,6 +60,7 @@ private Q_SLOTS: void downloadItem(); void changePersistentPath(); void initiator(); + void badDeleteOrder(); void qtbug_72299(); // this should be the last test }; @@ -589,6 +590,24 @@ void tst_QWebEngineProfile::initiator() QCOMPARE(handler.initiator, QUrl()); } +void tst_QWebEngineProfile::badDeleteOrder() +{ + QWebEngineProfile *profile = new QWebEngineProfile(); + QWebEngineView *view = new QWebEngineView(); + view->resize(640, 480); + view->show(); + QVERIFY(QTest::qWaitForWindowExposed(view)); + QWebEnginePage *page = new QWebEnginePage(profile, view); + view->setPage(page); + + QSignalSpy spyLoadFinished(page, SIGNAL(loadFinished(bool))); + page->setHtml(QStringLiteral("<html><body><h1>Badly handled page!</h1></body></html>")); + QTRY_COMPARE(spyLoadFinished.count(), 1); + + delete profile; + delete view; +} + void tst_QWebEngineProfile::qtbug_72299() { QWebEngineView view; |