diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp index 14008d075..f92474d05 100644 --- a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp +++ b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp @@ -434,20 +434,17 @@ void tst_QWebEngineHistory::popPushState_data() QTest::newRow("replaceState") << "history.replaceState(\"a\", \"b\");"; QTest::newRow("back") << "history.back();"; QTest::newRow("forward") << "history.forward();"; - QTest::newRow("clearState") << "history.clearState();"; } /** Crash test, WebKit bug 38840 (https://bugs.webengine.org/show_bug.cgi?id=38840) */ void tst_QWebEngineHistory::popPushState() { -#if !defined(QWEBENGINEPAGE_EVALUATEJAVASCRIPT) - QSKIP("QWEBENGINEPAGE_EVALUATEJAVASCRIPT"); -#else QFETCH(QString, script); QWebEnginePage page; + QSignalSpy spyLoadFinished(&page, SIGNAL(loadFinished(bool))); page.setHtml("<html><body>long live Qt!</body></html>"); - page.evaluateJavaScript(script); -#endif + QTRY_COMPARE(spyLoadFinished.count(), 1); + evaluateJavaScriptSync(&page, script); } /** ::clear */ |