From 6d0367b9b9c7730012f7c6fe0febc831130863b8 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 20 Mar 2014 16:55:11 +0100 Subject: Unskip tst_QWebEngineHistory::popPushState This also add a loadFinished wait and remove the test of the removed clearState API. Change-Id: I677ae0aabdd9b115976bba8e87d59ae421f5b978 Reviewed-by: Zeno Albisser --- tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp | 9 +++------ 1 file 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("long live Qt!"); - page.evaluateJavaScript(script); -#endif + QTRY_COMPARE(spyLoadFinished.count(), 1); + evaluateJavaScriptSync(&page, script); } /** ::clear */ -- cgit v1.2.3